1

By adding the <PackageReference Include="SourceLink.Embed.AllSourceFiles" Version="2.8.0" PrivateAssets="all" /> tag in my .csproj file, I was able to embed the source files of my library in the nuget package. This was good.

However, when I try to debug into the library from client code, Visual Studio was unable to locate the source because the files it was looking for had absolute paths from the build server, e.g. Locating source for '/scratch/teamcity/work/d5de3351444bb38d/<ProjectFolder>/<SourceFile.cs>'

Is there something I overlooked that would make this process work correctly?

Update It appears that the package reference to SourceLink wasn't actually doing anything. Just setting the project to compile an "embedded" DLL was sufficient to get the absolute paths to the source included in the file.

I am building with dotnet on Linux. Is there a compatibility issue with SourceLink.Embed.AllSourceFiles in this context?

Gordon Bean
  • 4,272
  • 1
  • 32
  • 47

0 Answers0