File size: 4,774 Bytes
090629c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!--

***********************************************************************************************

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">

  <PropertyGroup>
    <!--

      Defines the list of file extensions that VS will monitor to reload the application.

      We'll only define these for C# projects targeting RazorLangVersion 3.0 or later, and let VS use defaults in other cases.

    -->
    <UpToDateReloadFileTypes Condition="'$(Language)'=='C#' AND '$(_Targeting30OrNewerRazorLangVersion)' == 'true' AND '$(RazorUpToDateReloadFileTypes)' != ''">$(UpToDateReloadFileTypes);$(RazorUpToDateReloadFileTypes)</UpToDateReloadFileTypes>
  </PropertyGroup>

  <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"/>

    <!--

      Defines the ability to understand the configuration for the Razor language service provided by

      the runtime/toolset packages. Introduced in 2.1

    -->
    <ProjectCapability Include="DotNetCoreRazorConfiguration" Condition="'$(_Targeting30OrNewerRazorLangVersion)' == 'true'"/>

    <!--

      Activates the set of nesting behaviors we want from solution explorer.

    -->
    <ProjectCapability Include="WebNestingDefaults" />

    <!--

      Tooling support for TypeScript files.

    -->
    <ProjectCapability Include="SupportsTypeScriptNuGet" />
  </ItemGroup>

  <!--

    In order to properly support Blazor partial classes we need to ensure that older SDKs don't

    add declaration files to the compile list. We do all the compilation work in-memory in latest

    VS.

  -->
  <Target Name="_RemoveRazorDeclartionsFromCompile" AfterTargets="RazorGenerateComponentDeclaration">
    <ItemGroup Condition="'$(DesignTimeBuild)'=='true'">
      <Compile Remove="@(_RazorComponentDeclaration)" />
    </ItemGroup>
  </Target>

  <!--

    WebSdk imports these capabilities for nesting in DotNetCoreWeb projects.

    Conditinally import these capabilities if the project isn't targeting the WebSdk.

   -->
  <ItemGroup Condition="'$(UsingMicrosoftNETSdkWeb)'==''">
    <ProjectCapability Include="SupportHierarchyContextSvc" />
    <ProjectCapability Include="DynamicDependentFile" />
    <ProjectCapability Include="DynamicFileNesting" />
  </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>
    <PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\RazorGenerateWithTargetPath.xaml">
      <Context>Project</Context>
    </PropertyPageSchema>
    <PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\RazorComponentWithTargetPath.xaml">
      <Context>Project</Context>
    </PropertyPageSchema>
  </ItemGroup>

  <Target

    Name="RazorGenerateDesignTime"

    DependsOnTargets="ResolveRazorGenerateInputs;AssignRazorGenerateTargetPaths"

    Returns="@(RazorGenerateWithTargetPath)">
  </Target>

  <!--

    Using DependsOnTargets here because real dependencies of this target aren't defined in

    a downlevel (pre-3.0) SDK.

  -->
  <Target

    Name="RazorGenerateComponentDesignTime"

    DependsOnTargets="$(_RazorGenerateComponentDesignTimeDependsOn)"

    Returns="@(RazorComponentWithTargetPath)">
  </Target>


  <!--

    Using DependsOnTargets here because real dependencies of this target aren't defined in

    a downlevel (pre-3.0) SDK.



    Called by the project system to update generated declaration files

  -->
  <Target

    Name="RazorGenerateComponentDeclarationDesignTime"

    DependsOnTargets="$(_RazorGenerateComponentDeclarationDesignTimeDependsOn)">
  </Target>

</Project>