-
Notifications
You must be signed in to change notification settings - Fork 409
SourceLink
SourceLink allows source code to be downloaded on demand when debugging.
As of Wilson 5.2.2, SourceLink is enabled in our release builds (so there's nothing you need to do!).
However, if you're interested in including SourceLink in your own project, the simplest way is to include this nuget PackageReference in every project that you want SourceLink enabled for:
<Project>
<ItemGroup>
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.0" PrivateAssets="All" />
</ItemGroup>
</Project>
Then, at build time, simply make sure that the property /p:SourceLinkCreate=true is set for either dotnet.exe or msbuild.exe. This will embed a JSON configuration file that contains information about the original source code in the PDB, allowing Visual Studio (and other debuggers) to retrieve it from GitHub or other hosted services. More information on using SourceLink can be found in the official SourceLink documentation provided in the Additional References section at the bottom of this page.
If you're using a library that has SourceLink enabled and you don't already have access to the original source files, you will see the following prompt if, for example, an exception is thrown:
We have confirmed that this works properly with Visual Studio 2017, but according to the SourceLink documentation it is also supported by Visual Studio Code, JetBrains dotPeek, and JetBrains ReSharper.
SourceLink GitHub repo/README:
https://github.com/ctaggart/SourceLink
SourceLink Wiki:
https://github.com/ctaggart/SourceLink/wiki
SourceLink spec:
https://github.com/dotnet/designs/blob/master/accepted/diagnostics/source-link.md
Conceptual Documentation
- Using TokenValidationParameters.ValidateIssuerSigningKey
- Scenarios
- Validating tokens
- Outbound policy claim type mapping
- How ASP.NET Core uses Microsoft.IdentityModel extensions for .NET
- Using a custom CryptoProvider
- SignedHttpRequest aka PoP (Proof-of-Possession)
- Creating and Validating JWEs (Json Web Encryptions)
- Caching in Microsoft.IdentityModel
- Resiliency on metadata refresh
- Use KeyVault extensions
- Signing key roll over