I am trying to package my project file and creating a nuget package using something like this: NuGet pack file.csproj -p Configuration=$(ConfigurationName); -NoPackageAnalysis.
But the problem is it's putting the files/folders relevant to project in "content" folder and assemblies in "lib" folder but I want files/folder in root and library in bin folder something like this . But right now my folder structure is this :
The structure of my nuspec file is
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>abc</authors>
<owners>abc</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>abc</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 9999</copyright>
<tags></tags>
</metadata>
<files>
<file src="bin\**" target="bin" />
<file src="$target$\**\*.*" target=""/>
</files>
</package>
Even excluding from my nuspec file results in the same output structure shown in second image. I am using nuget version 4.1.0 and I also tried with earlier version of nuget like 2.8.6.