Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

nuget pack produces unwanted content folder out of nowhere

$
0
0

I have a .NET Framework class library project that I'm turning into a nuget package and uploading to my own nuget server.

This is how the project looks:

enter image description here

Really simple, just a single .cs file with a few classes.

I'm compiling the code with Debug configuration and Any CPU platform.

Produced files are the following: Synteco.ScriptInterpreter.dll and a .pdb file with the same name

In the directory of my .csproj file I also have a .nuspec file, which looks like this:enter image description here

I'm only copying the Synteco-Icon.png file in the images folder in the final .nupkg in order to set the icon for my nuget package.

Upon running nuget pack I'm getting the following output

enter image description here

As we can see, everything seems to be in order.

However, if we look into the produced .nupkg file, its contents are:

enter image description here

Somehow the folder content has been created. In the past this folder was not created at all.

I am able to push this nuget package to my server, but when I download it via Nuget Package Manager in other projects, everything from the content folder is being copied into the project that is trying to use that nuget package. For larger packages this becomes a real issue and unwanted files are being copied to projects.

What is the issue and how can I stop the content folder from being created?

I've tried running nuget pack [NAME_OF_MY_NUSPEC_FILE] but that would produce something even more strange. Take a look:

enter image description here

Am I doing something wrong?

P.S.

As far as I'm concerned, this is how a proper nuget package should look like. This is Newtonsoft.Json:

enter image description here


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>