I have a problem with nuget pack renaming web.config to web.config.transform in my project. I am using the csproj file with the nuspec file next to it and there is no line in the nuspec file to tell nuget to rename the file, but in the output file and nupkg file web.config is renamed to web.config. conversion.
web.config is not part of the project, it is just added by the nuspec file (as usual, it is generated by the build process)
Can someone suggest why he does this - he feels to me like an error in nuget, but maybe there is something in the csproj file that nuget accepts as an instruction for renaming? What could it be?
Command:
nuget pack path\to\projectfile\myproject.csproj -OutputDirectory C:\temp\publish -Version 1.1.646.32517 -Exclude Template.config -Exclude Template.Debug.config -Exclude Template.Release.config -Verbosity detailed
output:
Attempting to build package from 'myproject.csproj'. Packing files from 'path\to\projectfile\bin'. Using 'myproject.nuspec' for metadata. Add file 'path\to\projectfile\bin\myproject.dll' to package as 'lib\net451\myproject.dll' Add file ... to package as ... ... Found packages.config. Using packages listed as dependencies Id: myproject Version: 1.1.646.32517 Authors: xxx Description: myproject Dependencies: Microsoft.AspNet.WebApi (= 5.2.3) Added file 'content\ApiTestPage.html'. Added file ........ ..... Added file 'content\Web.config.transform'. Added file 'lib\net451\myproject.dll'. Successfully created package 'C:\temp\publish\myproject.1.1.646.32517.nupkg'.
Nuspec file:
<?xml version="1.0"?> <package > <metadata> <id>$id$</id> <version>$version$</version> <title>$title$</title> <authors>$author$</authors> <owners>$author$</owners> <description>$description$</description> <requireLicenseAcceptance>false</requireLicenseAcceptance> <releaseNotes>xxx release.</releaseNotes> <copyright>Copyright xxx 2015</copyright> </metadata> <files> <file src="bin\*.*" target="content\bin" /> <file src="web.config" target="content" /> </files> </package>
Thank you in advance
Chris
source share