I have a nuspec template file (template.nuspec.pp) in the content folder of a Nuget package. When the package is installed, I modify the name of the nuspec file using an install.ps1 script to match the targeted assembly. I want the contents of the nuspec file to remain unchanged:
<?xml version="1.0"?>
<package>
<metadata>
<id>$rootnamespace$</id>
<version>$version$</version>
<title>$rootnamespace$</title>
<authors>$author$</authors>
<!--<iconUrl></iconUrl>-->
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$rootnamespace$</description>
<copyright>$copyright$</copyright>
<tags></tags>
</metadata>
</package>
The replacement tokens are replaced immediately on installation, however - I was under the impression this should happen only when nuget pack is called. Why is this happening, and what need I do to prevent it?
In case folks wonder, my install.ps1 file is not touching the contents of the nuspec template.