NuRep your local NuGet+symbols+source repository
By Jérémie Chassaing on Sunday, February 26, 2012, 11:25 - NuRep - Permalink
As some of you already know, I'm a proponent of DRY : Do Repeat Yourself, but code reuse has some value and nuget is a good way to manage it.
So far, the advantages I see in using a package manager are:
- easy get/update of external projects and their dependencies
- on demand dependency update (instead of forced dependency update)
- makes it easier to modularize dependencies
All this thing are out of the box when using OSS projects published on nuget.org, and you can host your own nugets using NuGet.Server.
The debugging story is also quite good. symbolsource.org can host symbols and source packages and be used as source server. You can directly step in your favorite OSS source code without having to compile it yourself. They even provide private repositories.
But sending your company's source code to an external service is not always compatible with internal policy.
In this configuration, using your own nugets leads to a poor dev experience when you have no way to step in your own code : compiled in Release and potentially not your latest code version, indicating the source code in another directory will not give good results.
You need a source server.
NuRep to the rescue
NuRep is a nuget repository based on NuGet.Server but it is also a symbols + code server.
When creating your nuget package, specify the –Symbols flag, and nuget will create a .nupkg and a .symbols.nupkg that you can push to NuRep (http://myserver/nurep/api/v2/package).
Then configure visual studio's symbols servers (Tools / Options / Debugging / Symbols / add http://myserver/nurep/symbols )
Don't forget to enable source server in Debugging / General options, and to disable Just my code.
That's it.
Now you'll step into the exact code that was used to compile the nuget version.
Have fun !
Comments
Hi Jérémie,
I cannot get this working. The symbol is published fine on my dev server. However, when I point visual studio to nuget.dev/symbols, it cannot load symbols from it. However, if I directly point visual studio to the folder contains pdb files, it works fine.
Could you help me with this?
I'm interested in this, but could use more details on what to do to get it installed/running.
Hi Jérémie,
It looks like we're running into the same problem that Yin is having. Did you have any advice to offer him? We are not able to get visual studio to pull down the symbols packages that have been published.
Thanks!
You should try to clear the symbol cache.
Once VS has loaded a .pdb symbol file for an assembly, or decided that it was not able to retrieve it, it won't try again on next run.
Once cleared, you can activate the 'Print source server diagnostic messages to the Output window' to see what VS is trying to load.
The Debug/Module View will also help you to see which symbols are loaded, and which are not.
Hope it helps.
I'm having problem opening the project with VS2010, it says the project type is not supported. If you could have a more detailed post on this, that would be great. Is this project still active? Thanks.
It is surely because it requires MVC 3...
Of course! For some reason I thought MVC3 has been installed. Just got the project compiled and hopefully it'll work :) Thank you.
Regarding the symbols loading issue;
Change the name of the "Symbols" folder to something like "SymbolsCode", and remember to change the web.config
<add key="symbolsPath" value="~/SymbolsCode" />
It seems that the service name and folder name are conflicting.
Jean
This is good. I have it running with TeamCity pushing a .nupkg and a .symbols.nupkg to my NuPeek site.
I'm not sure, though, if I am expecting TeamCity or NuPeek to do too much? After the successful push commands execute, I can see the packages have been copied to the Packages and SymbolPackages folders, respectively. But there is nothing in the Symbols folder.
It looks like I need to add a manual copy process for that. Please explain to a novice what exactly that should look like. Is it just a matter of copying the .pdb file, or are the source files needed too?