Don't invoke GetDotNetHost task from desktop msbuild. (#163)
* Don't invoke GetDotNetHost task from desktop msbuild. Fixes https://github.com/aspnet/MvcPrecompilation/issues/161
This commit is contained in:
parent
36bdecf56f
commit
73b5e2fd70
|
|
@ -38,11 +38,16 @@
|
||||||
DependsOnTargets="_CreateResponseFileForMvcRazorPrecompile"
|
DependsOnTargets="_CreateResponseFileForMvcRazorPrecompile"
|
||||||
Condition="'$(TargetFrameworkIdentifier)'=='.NETCoreApp'">
|
Condition="'$(TargetFrameworkIdentifier)'=='.NETCoreApp'">
|
||||||
|
|
||||||
<GetDotNetHost Condition="'$(MvcRazorRunCommand)'==''">
|
<!--
|
||||||
|
GetDotNetHost attempts to locate the muxer path if the executing process is a .NET Core application i.e. dotnet msbuild.
|
||||||
|
If we know we're being launched from desktop MSBuild, avoid running the task. We'll use the dotnet that appears in the path.
|
||||||
|
-->
|
||||||
|
<GetDotNetHost Condition="'$(MSBuildRuntimeType)'=='Core' AND '$(MvcRazorRunCommand)'==''">
|
||||||
<Output TaskParameter="MuxerPath" PropertyName="MvcRazorRunCommand" />
|
<Output TaskParameter="MuxerPath" PropertyName="MvcRazorRunCommand" />
|
||||||
</GetDotNetHost>
|
</GetDotNetHost>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<MvcRazorRunCommand Condition="'$(MvcRazorRunCommand)'==''">dotnet</MvcRazorRunCommand>
|
||||||
<_MvcViewCompilationBinaryPath Condition="'$(_MvcViewCompilationBinaryPath)'==''">$(MSBuildThisFileDirectory)$(MSBuildThisFileName).dll</_MvcViewCompilationBinaryPath>
|
<_MvcViewCompilationBinaryPath Condition="'$(_MvcViewCompilationBinaryPath)'==''">$(MSBuildThisFileDirectory)$(MSBuildThisFileName).dll</_MvcViewCompilationBinaryPath>
|
||||||
|
|
||||||
<ExecArgs>"$(MvcRazorRunCommand)" exec</ExecArgs>
|
<ExecArgs>"$(MvcRazorRunCommand)" exec</ExecArgs>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue