dotnet / dotnet/sourcelink

Debugging troubles on local, .NET 3.5

Open
#250 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.4k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

Hello, I encountered some troubles with debugging the .NET 3.5 application using the SourceLink.Embed.AllSourceFiles.
Here is [ a link to my my small experimental solutions](https://1drv.ms/f/s!AmHSdtP_6VrJo3ntMsBGtl9hgMj2)
a) SourceLinkLibs.sln - three libraries (two targeted to .NET Standard 2.0, one to the .NET Framework 3.5 Pack.cmd - try to create nuget packages into the .\nupkgs folder (successful only for the .NET Standard libs)
b) SourceLinkEdu.sln - the libraries consumer apps.

the steps and troubles:
1. I had troubles with making the NuGet package via command line dotnet pack (see the Pack.cmd), but the Pack command from the VS worked. Then I tried to the .NET 3.5. SDK through VS2017 Installer ([individual components](https://stackoverflow.com/a/48195606/3374507)), but still the dotnet pack didnt' work.

2. when all the nugets were made, I simply copied to my local nuget rep, (no problem here)

3. I opened the solution with the consumer apps (when running again, clearing everything before (the solution VS files, local nuget package cache (%Home%\.nuget\packages) for sure. (again no problem here, just mentioned to describe the steps)

4) opening the SourceLinkEdu.sln
4a. Debugging of the .NET standard libs was without problems - pdb files of the files was copied from the nuget package to the bin\Debug directory and the symbols and source successfully loaded;

4b) Debugging of the .NET 3.5 lib has some issues - On my original environment it once worked a way, that the pdb file was somehow fetched from the \obj\Debug\net35 directory; ad the second time it was not even there.
![image](https://user-images.githubusercontent.com/11144487/53720443-106f7300-3e61-11e9-81ca-28355df55818.png)

At his time it is not working and also not working in different developer environment - pdb symbols from the nuget package were simply not copied to the bin\Debug directory. If I manually copy it before debugging, the step into the code starts to work.

questions:
Do you know by chance, why the command line dothet pack end with error missing SDK for .NET 3.5; while the Pack command in the VS creates the NuGet package?
Do you have any suggestion/answer why it does not copy the pdb file to the bin\Debug solution during the compilation (step 4b) ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.