Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging private NuGet packages?

I've published some private/internal libraries as NuGet packages, using the symbols option. The packages and symbols are hosted on an internal network share. How can I step into these packages when debugging?

When I step to code from these packages, Visual Studio displays a "No Source Available" / "No Symbols Found" page. Clicking the "Load Symbols" only allows pdb files, not symbol packages.

These packages are not suitable for publishing on NuGet Gallery/SymbolSource.

like image 688
RyanW Avatar asked Oct 05 '12 04:10

RyanW


People also ask

Can we debug a NuGet package?

NuGet can act as a debug symbol server here, and Visual Studio can connect to it when it needs to debug symbols for a certain version of a DLL file from a NuGet package. NuGet will then serve those debugging symbols to Visual Studio.

How use NuGet private package?

Go to Tools > NuGet Package Manager > Package Manager Settings, select Package Manager Sources, and then click the + button. Choose feed Name, set the feed URL to: https://nuget.telerik.com/nuget, and click OK. Create or load your project. Go to Tools > NuGet Package Manager > Manage NuGet Packages for a solution.

How do I debug a package?

Compiling a package To compile the package for debugging, do the following: In Database Explorer, right-click the package you want to compile, click Compile, and then select Compile Dependants for Debugging to load debugging information for the objects on which the selected object is dependent.

How do I download a private NuGet package?

In Visual Studio, click Tools > Nuget Package Manager > Package Manager Settings. Select Package Sources and add your private server url in there. After that, when you click Manage Nuget Package for Solution, you will see drop down list on the right side with your private Nuget Server as a Package source.


1 Answers

What is the command that you used to generate the packages with the symbols? I tried to do the same exact thing nuget.exe pack -Prop Configuration=Release Framework.csproj -Symbols This creates two files: Framework.nupkg and Framework.symbols.nupkg. I put these files on a network share, used them from another project and debugging worked fine.

Have you tried putting the *.nupkg and *.symbols.nupkg files on a local disk instead of a network share?

like image 58
Erik Schierboom Avatar answered Sep 22 '22 12:09

Erik Schierboom