Fix check for use of compile items

This check was wrong, and since it runs after properties are evaluated,
we can use the results from evaulating properties to fix it.
This commit is contained in:
Ryan Nowak 2018-01-18 11:27:46 -08:00
parent e16134d4d2
commit 9f5d51656a
1 changed files with 2 additions and 2 deletions

View File

@ -83,9 +83,9 @@
<RazorCompileOnBuild>false</RazorCompileOnBuild>
</PropertyGroup>
<ItemGroup Condition="'@(MvcRazorFilesToCompile)'!='' and '$(_MvcPrecompilationExplicitlyDisabled)'!='true' and '$(_RazorSdkExplicitlyDisabled)'!='true'">
<ItemGroup Condition="'@(MvcRazorFilesToCompile)'!='' and ('$(RazorCompileOnBuild)'=='true' or '$(RazorCompileOnPublish)'=='true')">
<!--
This is case 5b or 5b, the project file has modified the MvcPrecompilation items but hasn't turned the Razor SDK.
This is case 5b or 5b, the project file has modified the MvcPrecompilation items but hasn't turned the Razor SDK off.
We can't disable the Razor SDK at this point, it's too late in the evaluation pass.
-->
<_RazorSdkCompatibilityError Include="Using the Razor SDK (RazorCompileOnBuild or RazorCompileOnPublish) and MvcRazorFilesToCompile together is not supported. To disable the Razor SDK targets, and use MvcPrecompilation set the property 'MvcRazorCompileOnPublish' to 'true' in the project file. To use the Razor SDK instead, replace 'MvcRazorFilesToCompile' with 'RazorGenerate'"/>