Maybe I\'m pushing the envelope here, but I\'m desperate to leverage NuGet to ease the DLL Hell that I\'ve found myself in.
We have 4 main products that all live in inte
Xavier's answer led me in the proper direction, and also informed my Google searching. I was not fully aware of the file declarations, and when searching along those lines, I found Joshua Flanagan's post Tips for building NuGet packages, which is excellent. Xavier and Joshua together taught me a few things:
.csproj
file, then sure, that's how it figures out how to package up all your source files. But you can also use -Symbols
on a .nuspec
file that includes the source via file elements. The normal NuGet package will not include the src directory, but the Symbols package will.So now, let me describe my build process as it occurs on my CI server:
bin\Release-3.5\merged
so I don't have to monkey with renaming the target assembly to temp.dll before I use it in the merge..nuspec
in Powershell. Here is the package command:
nuget pack src\MyProject\MyProject.nuspec -OutputDirectory .\output -Build -Symbols -Version $Version
Note that $Version is passed in from the build server so I can use its build number as the last part of the version.
Here is the .nuspec file:
MyProject
0.0.0
MyProject
David Boike
David Boike
false
MyProject
Copyright 2012
my tags
Note that I have removed a lot of the more informative elements from my nuspec because it just doesn't matter for an internal project like this.
The result is a package for my private NuGet server that contains DLL, PDB, and XML documentation for the assembly for both .NET 3.5 and 4.0, and then a separate symbols package for my private SymbolServer that includes all of the above plus the source. This is very easy to view with the NuGet Package Explorer which I highly recommend you download.
Finally, I tested everything and with the Visual Studio setup suggested at symbolsource.org (except with my own private symbol server) I was able to debug the code and easily step into the source.
Thanks again to Xavier for leading me down the right path!