Skip to content

Commit

Permalink
Merge pull request #1034 from iwillspeak/patch-1
Browse files Browse the repository at this point in the history
Respect DOTNET_HOST_PATH if set
  • Loading branch information
adamralph authored Aug 15, 2024
2 parents e68e5f0 + b18a7a1 commit 42f35a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MinVer/build/MinVer.targets
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<NoWarn>$(NoWarn);NU5105</NoWarn>
</PropertyGroup>

<PropertyGroup>
<DotNetPath>$(DOTNET_HOST_PATH)</DotNetPath>
<DotNetPath Condition=" '$(DotNetPath)' == '' ">dotnet</DotNetPath>
</PropertyGroup>

<Target Name="_MinVerClean" BeforeTargets="Clean" DependsOnTargets="MinVer" Condition="'$(GeneratePackageOnBuild)' == 'true'" />

<Target Name="MinVer" BeforeTargets="BeforeCompile;GetAssemblyVersion;CoreCompile" Condition="'$(DesignTimeBuild)' != 'true' AND '$(MinVerSkip)' != 'true'">
Expand Down Expand Up @@ -51,7 +56,7 @@
</ItemGroup>
<CacheGet Key="@(MinVerInputs->'%(Identity)', ' ')"><Output TaskParameter="Value" PropertyName="MinVerVersion" /></CacheGet>
<Message Condition="'$(MinVerVersion)' != ''" Importance="$(MinVerDetailed)" Text="MinVer: Using cached MinVerVersion $(MinVerVersion)" />
<Exec Condition="'$(MinVerVersion)' == ''" Command="dotnet &quot;$(MSBuildThisFileDirectory)bin/$(MinVerTargetFramework)/MinVer.dll&quot; &quot;$(MSBuildProjectDirectory)&quot; @(MinVerInputs->'%(Identity)', ' ')" ConsoleToMSBuild="true" StandardOutputImportance="Low" >
<Exec Condition="'$(MinVerVersion)' == ''" Command="&quot;$(DotNetPath)&quot; &quot;$(MSBuildThisFileDirectory)bin/$(MinVerTargetFramework)/MinVer.dll&quot; &quot;$(MSBuildProjectDirectory)&quot; @(MinVerInputs->'%(Identity)', ' ')" ConsoleToMSBuild="true" StandardOutputImportance="Low" >
<Output TaskParameter="ConsoleOutput" ItemName="MinVerConsoleOutput" />
</Exec>
<ItemGroup Condition="'$(MinVerVersion)' == ''" >
Expand Down

0 comments on commit 42f35a0

Please sign in to comment.