kdcllc/Bet.AspNetCore

Source Link stop working

kdcllc opened this issue · 2 comments

According to the following discussions:

The following must be updated in settings.props file:

<PropertyGroup>
  <DebugSymbols>True</DebugSymbols>
  <DebugType>Embedded</DebugType>
  <EmbedAllSources>True</EmbedAllSources>
</PropertyGroup>

You don't need DebugSymbols here, since it is overridden by DebugType.

You might want to be aware that those settings are not recommended for public packages, because it noticeably increases the size of the .nupkg and therefore download and restore times, by including debugging info and source files that only a few people will want or use. The better alternative for public repos is to use a separate .snupkg file (it which case you could use either SourceLink, which will work there, or no SourceLink and EmbedAllSources instead). For private or small audience size repos, the settings you've mentioned are fine and much easier to set up and use.

@mikebeaton thanks for the explanation of these changes. The documentation is definitely is lacking. I am looking into redoing the deployment process altogether with publishing to NuGet symbol server.

<DebugType>portable</DebugType>
dotnet pack  Bet.AspNetCore.sln -p:configuration=Release -p:Version=2.1.0 -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -o Packages -p:DebugType=portable

nuget push *.snupkg -Source https://api.nuget.org/v3/index.json