Skip to content

Allow for _GenerateSourceLinkFile to run when DebugType is none #830

Open

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions