Make imports work without warnings or errors when the Sdk is referenced via MsBuild and package.
This commit is contained in:
parent
6be6229d18
commit
010b43cedf
|
|
@ -10,7 +10,5 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
***********************************************************************************************
|
***********************************************************************************************
|
||||||
-->
|
-->
|
||||||
<Project ToolsVersion="14.0">
|
<Project ToolsVersion="14.0">
|
||||||
|
<Import Project="$(MSBuildThisFileDirectory)..\build\netstandard2.0\Sdk.Razor.CurrentVersion.props" Condition="'$(_RazorSdkPackageReferenced)' != 'true'" />
|
||||||
<Import Project="$(MSBuildThisFileDirectory)..\build\netstandard2.0\Sdk.Razor.CurrentVersion.props" />
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
-->
|
-->
|
||||||
<Project ToolsVersion="14.0">
|
<Project ToolsVersion="14.0">
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(RazorSdkTargetsPath)' == ''">
|
<PropertyGroup>
|
||||||
<RazorSdkTargetsPath Condition="'$(IsCrossTargetingBuild)' == 'true'">$(MSBuildThisFileDirectory)..\buildMultiTargeting\Sdk.Razor.CurrentVersion.MultiTargeting.targets</RazorSdkTargetsPath>
|
<_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>
|
<_RazorSdkTargetsPath Condition="'$(IsCrossTargetingBuild)' != 'true'">$(MSBuildThisFileDirectory)..\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets</_RazorSdkTargetsPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Import Project="$(RazorSdkTargetsPath)" />
|
<Import Project="$(_RazorSdkTargetsPath)" Condition="'$(_RazorSdkPackageReferenced)' != 'true'" />
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
<Import Project="Sdk.Razor.CurrentVersion.props" />
|
<Import Project="Sdk.Razor.CurrentVersion.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Redirect the SDK to use the targets from the current package -->
|
<_RazorSdkPackageReferenced>true</_RazorSdkPackageReferenced>
|
||||||
<RazorSdkTargetsPath>$(MSBuildThisFileDirectory)Sdk.Razor.CurrentVersion.targets</RazorSdkTargetsPath>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<!--
|
||||||
|
***********************************************************************************************
|
||||||
|
Microsoft.Net.Sdk.Razor.props
|
||||||
|
|
||||||
|
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">
|
||||||
|
<PropertyGroup>
|
||||||
|
<_RazorSdkPackageReferenced>true</_RazorSdkPackageReferenced>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
Loading…
Reference in New Issue