Fix issues with adding desktop reference.
* Add the reference only if precompilation is enabled. * Make the reference Private. We don't want it to be copied locally to the output
This commit is contained in:
parent
9b89aca3c3
commit
5834660081
|
|
@ -58,7 +58,7 @@
|
||||||
<Target
|
<Target
|
||||||
Name="_AddDesktopReferences"
|
Name="_AddDesktopReferences"
|
||||||
AfterTargets="ResolveLockFileReferences"
|
AfterTargets="ResolveLockFileReferences"
|
||||||
Condition="'$(_MvcViewCompilationAddDesktopReferences)'!='false' AND '$(TargetFrameworkIdentifier)'=='.NETFramework'">
|
Condition="'$(MvcRazorCompileOnPublish)'=='true' AND '$(_MvcViewCompilationAddDesktopReferences)'!='false' AND '$(TargetFrameworkIdentifier)'=='.NETFramework'">
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(_MvcViewCompilationBinaryPath)'==''">
|
<PropertyGroup Condition="'$(_MvcViewCompilationBinaryPath)'==''">
|
||||||
<_MvcViewCompilationBinaryPath Condition="'$(PlatformTarget)'=='x64'">$(MSBuildThisFileDirectory)$(MSBuildThisFileName)-x64.exe</_MvcViewCompilationBinaryPath>
|
<_MvcViewCompilationBinaryPath Condition="'$(PlatformTarget)'=='x64'">$(MSBuildThisFileDirectory)$(MSBuildThisFileName)-x64.exe</_MvcViewCompilationBinaryPath>
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(_MvcViewCompilationBinaryPath)'!=''">
|
<ItemGroup Condition="'$(_MvcViewCompilationBinaryPath)'!=''">
|
||||||
<Reference Include="$(_MvcViewCompilationBinaryPath)" Private="true" />
|
<Reference Include="$(_MvcViewCompilationBinaryPath)" Private="false" Visible="false" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue