Use properties in package props to redirect imports

This commit is contained in:
Pranav K 2018-02-15 08:26:26 -08:00
parent e5eda0b276
commit 501c180b5f
6 changed files with 13 additions and 37 deletions

View File

@ -10,5 +10,9 @@ Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0">
<Import Project="$(MSBuildThisFileDirectory)..\build\netstandard2.0\Sdk.Razor.CurrentVersion.props" Condition="'$(_RazorSdkPackageReferenced)' != 'true'" />
<PropertyGroup>
<RazorSdkCurrentVersionProps Condition="'$(RazorSdkCurrentVersionProps)' == ''">$(MSBuildThisFileDirectory)..\build\netstandard2.0\Sdk.Razor.CurrentVersion.props</RazorSdkCurrentVersionProps>
</PropertyGroup>
<Import Project="$(RazorSdkCurrentVersionProps)" />
</Project>

View File

@ -11,11 +11,11 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<Project ToolsVersion="14.0">
<PropertyGroup>
<_RazorSdkTargetsPath Condition="'$(IsCrossTargetingBuild)' == 'true'">$(MSBuildThisFileDirectory)..\buildMultiTargeting\Sdk.Razor.CurrentVersion.MultiTargeting.targets</_RazorSdkTargetsPath>
<_RazorSdkTargetsPath Condition="'$(IsCrossTargetingBuild)' != 'true'">$(MSBuildThisFileDirectory)..\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets</_RazorSdkTargetsPath>
<PropertyGroup Condition="'$(RazorSdkCurrentVersionTargets)' == ''">
<RazorSdkCurrentVersionTargets Condition="'$(IsCrossTargetingBuild)' == 'true'">$(MSBuildThisFileDirectory)..\buildMultiTargeting\Sdk.Razor.CurrentVersion.MultiTargeting.targets</RazorSdkCurrentVersionTargets>
<RazorSdkCurrentVersionTargets Condition="'$(IsCrossTargetingBuild)' != 'true'">$(MSBuildThisFileDirectory)..\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets</RazorSdkCurrentVersionTargets>
</PropertyGroup>
<Import Project="$(_RazorSdkTargetsPath)" Condition="'$(_RazorSdkPackageReferenced)' != 'true'" />
<Import Project="$(RazorSdkCurrentVersionTargets)" />
</Project>

View File

@ -10,9 +10,8 @@ Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0">
<Import Project="Sdk.Razor.CurrentVersion.props" />
<PropertyGroup>
<_RazorSdkPackageReferenced>true</_RazorSdkPackageReferenced>
<RazorSdkCurrentVersionProps>$(MSBuildThisFileDirectory)Sdk.Razor.CurrentVersion.props</RazorSdkCurrentVersionProps>
<RazorSdkCurrentVersionTargets>$(MSBuildThisFileDirectory)Sdk.Razor.CurrentVersion.targets</RazorSdkCurrentVersionTargets>
</PropertyGroup>
</Project>

View File

@ -1,14 +0,0 @@
<!--
***********************************************************************************************
Microsoft.NET.Sdk.Razor.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0">
<Import Project="Sdk.Razor.CurrentVersion.targets" />
</Project>

View File

@ -11,6 +11,7 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<Project ToolsVersion="14.0">
<PropertyGroup>
<_RazorSdkPackageReferenced>true</_RazorSdkPackageReferenced>
<RazorSdkCurrentVersionProps>$(MSBuildThisFileDirectory)..\build\netstandard2.0\Sdk.Razor.CurrentVersion.props</RazorSdkCurrentVersionProps>
<RazorSdkCurrentVersionTargets>$(MSBuildThisFileDirectory)Sdk.Razor.CurrentVersion.MultiTargeting.targets</RazorSdkCurrentVersTargetsFile>
</PropertyGroup>
</Project>

View File

@ -1,14 +0,0 @@
<!--
***********************************************************************************************
Microsoft.NET.Sdk.Razor.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0">
<Import Project="Sdk.Razor.CurrentVersion.MultiTargeting.targets" />
</Project>