You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.
The .NET Core 2.1 SDK has the ability to enable and disable source linking using the EnableSourceLink property. SourceLink v2 uses SourceLinkCreate property. SourceLink v3 will build on top the .NET SDK functionality, so SourceLinkCreate will be removed in favor of EnableSourceLink.
Its behavior is a bit different. It is enabled by default when run from the command line, but not an IDE like Visual Studio. Details are in:
So would I add <EnableSourceLink>true</EnableSourceLink> in the .csproj of the library? Or in the .csproj of the project that wants to use the library?
@tlorton, when using libraries like Microsoft.SourceLink tools, EnableSourceLink is true be default when you are building from the command line. You don't have to do anything. In SourceLink.Create tools, SourceLinkCreate is false by default.
<!-- Do not generate SourceLink when building in the IDE or for Live Unit Testing.-->
<EnableSourceLinkCondition="'$(EnableSourceLink)' == '' and '$(DesignTimeBuild)' != 'true' and '$(BuildingForLiveUnitTesting)' != 'true'">true</EnableSourceLink>
Sorry, I neglected to mention that I am using Visual Studio 2017 IDE. From your response, I infer that once my team upgrades the .NET SDK to use .NET Core 2.1, we can then install the most recent SourceLink Nuget Package and that automatically comes default as true for EnableSourceLink, therefore not needing to set to true in the .csproj.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The .NET Core 2.1 SDK has the ability to enable and disable source linking using the
EnableSourceLink
property. SourceLink v2 usesSourceLinkCreate
property. SourceLink v3 will build on top the .NET SDK functionality, soSourceLinkCreate
will be removed in favor ofEnableSourceLink
.Its behavior is a bit different. It is enabled by default when run from the command line, but not an IDE like Visual Studio. Details are in:
https://github.com/dotnet/sourcelink/blob/master/src/SourceLink.Common/build/Microsoft.SourceLink.Common.props
The text was updated successfully, but these errors were encountered: