Nuget pack csproj using nuspec -


i want create nuget package contains specified in nuspec file, still version csproj. in order use token have pack like:

nuget pack myproj.csproj 

but when adds dependencies , creates unwanted folder in nuget package. nuspec file is:

<?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">   <metadata>         <id>test</id>     <version>$version$</version>     <title>test</title>     <authors>test</authors>     <owners>test</owners>     <requirelicenseacceptance>false</requirelicenseacceptance>     <description>test</description>     <summary>test</summary>     <releasenotes>test</releasenotes>     <copyright>test</copyright>     </metadata>   <files>     <file src="bin\debug\*.dll" target="lib\net45" />     <file src="bin\debug\myproj.wpf.exe" target="lib\net45" />     <file src="bin\debug\myproj.wpf.exe.config" target="lib\net45" />   </files> </package> 

when run pack command file adds myproj.wpf.exe in target="lib\net452"

can force not add dependencies , file? or specified in nuspec?

if want have more control on nuget package generation (.nupkg) use .nuspec file directly instead of using project file.

nuget pack myproj.nuspec 

or modify project targets .net 4.5 , not net 4.5.2.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -