I have a NuGet package I'm trying to publish that contains both assemblies and content files. After publishing the standard and symbols packages, the content files from the standard package are gone.
When I run NuGet packaging the filesystem looks like this:
As you can see, I have it all set up and ready to go.
I then run the commands to pack the NuGet packages using
nuget.exe version 2.8.5:
nuget.exe pack MyProduct.nuspec
nuget.exe pack MyProduct.nuspec -Symbols
What I get out of that is two package files:
If I look inside the
MyProduct.1.0.0.nupkg file, I see:
If I look inside
MyProduct.1.0.0.symbols.nupkg I see:
Note the important difference there: the symbols package doesn't contain the content files. That's not something I have control over - it's the way
nuget.exe packages things and is the standard per the NuGet documentation.
I then push the first package to my ProGet server:
nuget.exe push MyProduct.1.0.0.nupkg myapikey -s http://proget/feeds/Default
If I download that package immediately after pushing, I can open it up and see the content files are still there. It's exactly like the
MyProduct.1.0.0.nupkg file that I pushed. ProGet doesn't show symbols as being available yet because, obviously, they're not.
I then push the symbols package:
nuget.exe push MyProduct.1.0.0.symbols.nupkg myapikey -s http://proget/feeds/Default
ProGet now shows symbols as being available and I can download a symbol package that includes PDB and source files. If I download the symbols package
MyProduct.1.0.0.symbols.nupkg from ProGet, it's exactly like the one I pushed.
If I download the
MyProduct.1.0.0.nupkg package now, after pushing symbols, the content files are gone. The
MyProduct.1.0.0.nupkg on ProGet now looks like this inside:
The content is gone.
I did find this question where it sounded like folks assumed a symbol package only differs from a regular package by the fact that the symbol package has everything the regular package has with the addition of PDB and source files.
This is not the case. Symbol packages strip out content, build, tools, and other stuff that isn't symbols.
I am guessing that by uploading the symbols package, ProGet is dynamically re-creating the non-symbol package internally based on what's in the symbols package. I can't say for sure, but that's certainly how it appears.
As a temporary workaround, I'm going to have to stop publishing symbols for this package until I have a resolution.
Where did my content go and how can I get it back?