dotnet / dotnet/sourcelink

Allow for _GenerateSourceLinkFile to run when DebugType is none

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

Description

In our case, the native build is using a non-msbuild orchestrator and MSVC as the compiler. We like to use sourcelink becuase it makes things like dump diagnosis a lot more convenient, and we were leveraging the targets here to do the heavy lifting of getting the commit and writing the file. We were doing this in a NoTargets project since we don't really want any language targets to run, and most of the targets under `_GenerateSourceLinkFile` run correctly. Only issue is it's guarded on `DebugType`. Is it possible to safely remove the condition and have it generate the file (even if it needs a special prop, like debugType or GenerateSourceLinkFileAlways)? I tested removing the guard, and build both a NoTargets and a csproj SDK style one and both succeeded with no issues and the files contain the expected contents.

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.