Skip to content

Commit 2767d46

Browse files
authored
Merge pull request #3827 from arturcic/#3787
Disable GitVersion task when running with MsBuild on .NET Framework (including Visual Studio)
2 parents dc0b4bd + 6af0bc2 commit 2767d46

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
</PropertyGroup>
2525

2626
<PropertyGroup>
27+
<!-- The GitVersion task is explicitly disabled when running on the .NET Framework because it's no longer supported.
28+
If a project that uses GitVersion.MsBuild is opened in Visual Studio,
29+
the task will be turned off because Visual Studio operates on the .NET Framework's version of MSBuild.
30+
However, you can still execute GitVersion.MsBuild as part of the `dotnet build` or `dotnet msbuild` commands. -->
31+
<DisableGitVersionTask Condition=" '$(MSBuildRuntimeType)' != 'Core' ">true</DisableGitVersionTask>
32+
2733
<DisableGitVersionTask Condition=" '$(DisableGitVersionTask)' == '' ">false</DisableGitVersionTask>
2834

2935
<!-- Property that enables WriteVersionInfoToBuildLog -->

0 commit comments

Comments
 (0)