Prepare for Web SDK changes

The Web SDK is going to set a new msbuild property to tell us that the
Razor SDK should be active. This hasn't been integrated into our build
system yet, so I'm temporarily hacking it until we get that change. At
that time I'll remove the special cases in these projects.
This commit is contained in:
Ryan Nowak 2018-01-18 19:08:03 -08:00
parent d4ed8a7b77
commit 233e67d0e0
5 changed files with 20 additions and 7 deletions

View File

@ -165,7 +165,7 @@
Name="_RazorPrepareForPublish" Name="_RazorPrepareForPublish"
AfterTargets="PrepareForPublish" AfterTargets="PrepareForPublish"
DependsOnTargets="RazorCompile" DependsOnTargets="RazorCompile"
Condition="'$(RazorCompileOnPublish)'=='true'"> Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnPublish)'=='true'">
</Target> </Target>
<!-- <!--
@ -174,9 +174,10 @@
<Target <Target
Name="_RazorAddBuiltProjectOutputGroupOutput" Name="_RazorAddBuiltProjectOutputGroupOutput"
DependsOnTargets="ResolveRazorGenerateInputs" DependsOnTargets="ResolveRazorGenerateInputs"
BeforeTargets="BuiltProjectOutputGroup"> BeforeTargets="BuiltProjectOutputGroup"
Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnBuild)'=='true'">
<ItemGroup Condition="'@(RazorGenerate)'!= '' and '$(RazorCompileOnBuild)' == 'true'"> <ItemGroup Condition="'@(RazorGenerate)'!= ''">
<BuiltProjectOutputGroupOutput Include="@(RazorIntermediateAssembly)" FinalOutputPath="$(Outdir)$(RazorTargetName).dll" /> <BuiltProjectOutputGroupOutput Include="@(RazorIntermediateAssembly)" FinalOutputPath="$(Outdir)$(RazorTargetName).dll" />
</ItemGroup> </ItemGroup>
@ -190,7 +191,7 @@
Name="_RazorGetCopyToOutputDirectoryItems" Name="_RazorGetCopyToOutputDirectoryItems"
BeforeTargets="GetCopyToOutputDirectoryItems" BeforeTargets="GetCopyToOutputDirectoryItems"
DependsOnTargets="RazorCompile" DependsOnTargets="RazorCompile"
Condition="'$(RazorCompileOnBuild)'=='true'"> Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnBuild)'=='true'">
<!-- <!--
This condition needs to be inside the target because it the itemgroup will be populated after the target's This condition needs to be inside the target because it the itemgroup will be populated after the target's
@ -220,7 +221,7 @@
Name="_RazorGetCopyToPublishDirectoryItems" Name="_RazorGetCopyToPublishDirectoryItems"
BeforeTargets="GetCopyToPublishDirectoryItems" BeforeTargets="GetCopyToPublishDirectoryItems"
DependsOnTargets="RazorCompile" DependsOnTargets="RazorCompile"
Condition="'$(RazorCompileOnBuild)'=='true' or '$(RazorCompileOnPublish)'=='true'"> Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnPublish)'=='true'">
<!-- <!--
This condition needs to be inside the target because it the itemgroup will be populated after the target's This condition needs to be inside the target because it the itemgroup will be populated after the target's
@ -247,7 +248,7 @@
Name="_RazorCopyFilesToOutputDirectory" Name="_RazorCopyFilesToOutputDirectory"
DependsOnTargets="RazorCompile" DependsOnTargets="RazorCompile"
AfterTargets="CopyFilesToOutputDirectory" AfterTargets="CopyFilesToOutputDirectory"
Condition="'$(RazorCompileOnBuild)'=='true'"> Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnBuild)'=='true'">
<!-- Copy the Razor dll --> <!-- Copy the Razor dll -->
<Copy <Copy
@ -294,7 +295,7 @@
<Target <Target
Name="_RazorComputeFilesToPublish" Name="_RazorComputeFilesToPublish"
AfterTargets="ComputeRefAssembliesToPublish" AfterTargets="ComputeRefAssembliesToPublish"
Condition="'@(RazorGenerate)'!='' and ('$(RazorCompileOnBuild)'=='true' or '$(RazorCompileOnPublish)'=='true')"> Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnPublish)'=='true' and '@(RazorGenerate)'!=''">
<!-- If we generated an assembly/pdb then include those --> <!-- If we generated an assembly/pdb then include those -->
<ItemGroup> <ItemGroup>

View File

@ -1,6 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
<!-- Workaround until we get a new SDK build -->
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,6 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
<!-- Workaround until we get a new SDK build -->
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(BinariesRoot)'==''"> <ItemGroup Condition="'$(BinariesRoot)'==''">

View File

@ -1,6 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
<!-- Workaround until we get a new SDK build -->
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(BinariesRoot)'==''"> <ItemGroup Condition="'$(BinariesRoot)'==''">

View File

@ -1,6 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
<!-- Workaround until we get a new SDK build -->
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(BinariesRoot)'==''"> <ItemGroup Condition="'$(BinariesRoot)'==''">