-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathSdk.props
97 lines (81 loc) · 4.76 KB
/
Sdk.props
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
<!--
***********************************************************************************************
Sdk.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" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Indicate to other targets that Microsoft.NET.Sdk.Web is being used.
-->
<PropertyGroup>
<UsingMicrosoftNETSdkWeb>true</UsingMicrosoftNETSdkWeb>
<EnableRazorSdkContent>true</EnableRazorSdkContent>
</PropertyGroup>
<!-- Default properties that shouldn't be replaced by the microsoft.net.sdk.props -->
<PropertyGroup>
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
</PropertyGroup>
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
<Import Sdk="Microsoft.NET.Sdk.Razor" Project="Sdk.props" />
<Import Sdk="Microsoft.NET.Sdk.Web.ProjectSystem" Project="Sdk.props" />
<Import Sdk="Microsoft.NET.Sdk.Publish" Project="Sdk.props" />
<ItemGroup Condition="'$(DisableImplicitFrameworkReferences)' != 'true' And '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' >= '3.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" IsImplicitlyDefined="true" />
</ItemGroup>
<ItemGroup Condition="'$(DisableImplicitAspNetCoreAnalyzers)' != 'true' And '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' >= '3.0'">
<Analyzer
Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..))\analyzers\cs\Microsoft.AspNetCore.Analyzers.dll"
Condition="'$(Language)'=='C#'"
IsImplicitlyDefined="true" />
<Analyzer
Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..))\analyzers\cs\Microsoft.AspNetCore.Mvc.Analyzers.dll"
Condition="'$(Language)'=='C#'"
IsImplicitlyDefined="true" />
<Analyzer
Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..))\analyzers\cs\Microsoft.AspNetCore.Mvc.Api.Analyzers.dll"
Condition="'$(Language)'=='C#' AND '$(IncludeOpenAPIAnalyzers)' == 'true'"
IsImplicitlyDefined="true" />
</ItemGroup>
<ItemGroup Condition="'$(DisableImplicitComponentsAnalyzers)' != 'true' And '$(DisableImplicitAspNetCoreAnalyzers)' != 'true'
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
And $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0'))
And $([MSBuild]::VersionLessThanOrEquals('$(TargetFrameworkVersion)', '6.0'))">
<Analyzer
Include="$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..))\analyzers\cs\Microsoft.AspNetCore.Components.SdkAnalyzers.dll"
Condition="'$(Language)'=='C#'"
IsImplicitlyDefined="true" />
</ItemGroup>
<!-- The RequestDelegateGenerator is bundled into the Microsoft.AspNetCore.App ref pack.-->
<!-- We want this generator to be disabled by default so we remove it from the list of-->
<!-- analyzers here. Since this depends on the analyzer having already been added to the-->
<!-- `Analyzer` item group by previous tasks in the build, we must wrap this work in a-->
<!-- target that executes right before the compilation loop.-->
<Target Name="RemoveRequestDelegateGenerator" BeforeTargets="CoreCompile">
<ItemGroup>
<Analyzer
Remove="@(Analyzer->HasMetadata('FileName')->WithMetadataValue('FileName', 'Microsoft.AspNetCore.Http.Generators'))"
Condition="'$(Language)'=='C#' AND '$(EnableRequestDelegateGenerator)' != 'true'"/>
</ItemGroup>
</Target>
<ItemGroup Condition="'$(Language)' == 'C#' AND ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable')">
<Using Include="System.Net.Http.Json" />
<Using Include="Microsoft.AspNetCore.Builder" />
<Using Include="Microsoft.AspNetCore.Hosting" />
<Using Include="Microsoft.AspNetCore.Http" />
<Using Include="Microsoft.AspNetCore.Routing" />
<Using Include="Microsoft.Extensions.Configuration" />
<Using Include="Microsoft.Extensions.DependencyInjection" />
<Using Include="Microsoft.Extensions.Hosting" />
<Using Include="Microsoft.Extensions.Logging" />
</ItemGroup>
<PropertyGroup>
<SdkContainerSupportPackageVersion>0.3.2</SdkContainerSupportPackageVersion>
</PropertyGroup>
<ItemGroup Condition="'$(EnableSdkContainerSupport)' == 'true'">
<PackageReference Include="Microsoft.NET.Build.Containers" Version="$(SdkContainerSupportPackageVersion)" IsImplicitlyDefined="true" />
</ItemGroup>
</Project>