Separate VS/DesignTime properties from general SDK properties
Fixes #2069
This commit is contained in:
parent
8938f6c8c2
commit
33e60ae363
|
|
@ -0,0 +1,38 @@
|
|||
<!--
|
||||
***********************************************************************************************
|
||||
Microsoft.NET.Sdk.Razor.DesignTime.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">
|
||||
|
||||
<ItemGroup>
|
||||
<!--
|
||||
Defines the generic .NET Core 'Razor' capability.
|
||||
|
||||
Note that we don't define any capabilities here that depend on the version of the runtime/toolset
|
||||
in use by the project. Those capabilities are defined by the relevant runtime packages so that
|
||||
we use the lack of the capability to detect downlevel scenarios.
|
||||
-->
|
||||
<ProjectCapability Include="DotNetCoreRazor"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\RazorConfiguration.xaml">
|
||||
<Context>File</Context>
|
||||
</PropertyPageSchema>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\RazorExtension.xaml">
|
||||
<Context>File</Context>
|
||||
</PropertyPageSchema>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\RazorGeneral.xaml">
|
||||
<Context>Project</Context>
|
||||
</PropertyPageSchema>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -72,27 +72,4 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<None Remove="**\*.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!--
|
||||
Defines the generic .NET Core 'Razor' capability.
|
||||
|
||||
Note that we don't define any capabilities here that depend on the version of the runtime/toolset
|
||||
in use by the project. Those capabilities are defined by the relevant runtime packages so that
|
||||
we use the lack of the capability to detect downlevel scenarios.
|
||||
-->
|
||||
<ProjectCapability Include="DotNetCoreRazor"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\RazorConfiguration.xaml">
|
||||
<Context>File</Context>
|
||||
</PropertyPageSchema>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\RazorExtension.xaml">
|
||||
<Context>File</Context>
|
||||
</PropertyPageSchema>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\RazorGeneral.xaml">
|
||||
<Context>Project</Context>
|
||||
</PropertyPageSchema>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -491,9 +491,15 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
|
||||
<Target Name="_EnsureRazorCompilerReferenced" Condition="'$(IsRazorCompilerReferenced)' != 'true'">
|
||||
<Error Text="A reference to Microsoft.AspNetCore.Razor.Design is required for this target to succeed. See todo:fwlink for instructions on how to resolve this." />
|
||||
|
||||
</Target>
|
||||
|
||||
<PropertyGroup Condition="'$(RazorDesignTimeTargets)'==''">
|
||||
<RazorDesignTimeTargets>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Razor\Microsoft.NET.Sdk.Razor.DesignTime.targets</RazorDesignTimeTargets>
|
||||
<RazorDesignTimeTargets Condition="!Exists('$(RazorDesignTimeTargets)')">$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.Razor.DesignTime.targets</RazorDesignTimeTargets>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(RazorDesignTimeTargets)" />
|
||||
|
||||
<!--
|
||||
This is a hook to import a set of targets after the Razor targets. By default this is unused.
|
||||
-->
|
||||
|
|
|
|||
|
|
@ -268,6 +268,21 @@
|
|||
<Copy SourceFiles="$(OutDir)$(AssemblyName).pdb" DestinationFolder="$(SymbolsPublishDir)" />
|
||||
</Target>
|
||||
|
||||
<!-- Include Razor SDK design time assets in the VSIX -->
|
||||
<ItemGroup>
|
||||
<Content Include="..\..\src\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Microsoft.NET.Sdk.Razor.DesignTime.targets">
|
||||
<IncludeInVsix>true</IncludeInVsix>
|
||||
<InstallRoot>MSBuild</InstallRoot>
|
||||
<VSIXSubPath>Microsoft\VisualStudio\Razor\</VSIXSubPath>
|
||||
</Content>
|
||||
|
||||
<Content Include="..\..\src\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Rules\*.xaml">
|
||||
<IncludeInVsix>true</IncludeInVsix>
|
||||
<InstallRoot>MSBuild</InstallRoot>
|
||||
<VSIXSubPath>Microsoft\VisualStudio\Razor\Rules\</VSIXSubPath>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
Begin workaround for https://github.com/dotnet/sdk/issues/433
|
||||
|
||||
|
|
@ -293,6 +308,7 @@
|
|||
</Content>
|
||||
</ItemGroup>
|
||||
<!-- End workaround for https://github.com/dotnet/sdk/issues/433 -->
|
||||
|
||||
<Target Name="GetBuildVersion" Outputs="$(VsixVersion)" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="Exists('$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets')" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue