-
-
Notifications
You must be signed in to change notification settings - Fork 290
Open
Labels
area-internalInternal issue, created for transparency, could be a code taskInternal issue, created for transparency, could be a code task
Description
I recently installed VS 2026 (clean) and now I encountered an issue. Looks like on my computer Git can't be found now, and therefore the AutoDarkModeLib can't be built and then AutoDarkModeApp also fails. Copilot has a solution/workaround for this.
Snippet
<Target Name="GetGitDescribe" BeforeTargets="BeforeBuild">
<!-- Run git describe but do not make the build fail if git is not available -->
<Exec Command="git describe --all --long" ConsoleToMSBuild="true" ContinueOnError="true">
<Output TaskParameter="ConsoleOutput" PropertyName="GitDescribe" />
</Exec>
<!-- Provide a stable fallback when git produced no output -->
<PropertyGroup>
<GitDescribe Condition="'$(GitDescribe)' == ''">v0.0.0-unknown</GitDescribe>
</PropertyGroup>
</Target>Screenshot

ChenYiLins
Metadata
Metadata
Assignees
Labels
area-internalInternal issue, created for transparency, could be a code taskInternal issue, created for transparency, could be a code task