In this post, we will see the easiest way to create a package with all the symbols in Visual Studio 2017. So that once we install a symbol server and upload package to this symbol server then we can debug that package in Visual Studio 2017.  I will share steps to debug package in Visual Studio 2017 in "Setup and Debug NuGet packages in Visual Studio 2017". 

The process to Create a new package in Visual Studio 2017:

All process to create package will work as expected after these changes so you can use any of the processes to create new package i.e. msbuild, pack commands. Here I will explain default option to pack package with source and symbol. 

1. Create new dot net core library and implement your code based on requirement. 

Create new dotnet core library and implement you code based on requirement

2. Right-click on the project and click on Edit csproj button. 

2.	Write click on project and click on Edit csproj button

3. Add new entries for IncludeSource and IncludeSymbols as value true in PropertyGroup section as mention below and save the file. 

Add new entries for IncludeSource and IncludeSymbols as value true in PropertyGroup section

4. Right-click on the project again and click on Pack options to create the new package. 

Click on Pack options to create new package

5. It will create your package files at \bin\Debug

new_package_location

Steps to push package on the server:

1. Open package server on url http://yourservername:81/. (We are using Proget as symbol server. This is very good option to set up a simple symbol server)

2. Open feed CustomePackage to view all existing packages and click on Add package to upload the new package. If asked for username and password then put Admin as username and Admin as the password. 

3. Select upload from disk option.

4. Navigate to files shown in step 2.5 and select symbol file as highlighted in below image and click on open button.

5. Click on upload button on the screen and your new package will be uploaded and ready for the user. 

Latest on posts

Blog Archive

Tags