-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Microsoft.NET.Sdk.DefaultItems.props
130 lines (109 loc) · 7.8 KB
/
Microsoft.NET.Sdk.DefaultItems.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!--
***********************************************************************************************
Microsoft.NET.Sdk.DefaultItems.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 xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(NETCoreSdkBundledVersionsProps)' == ''">
<NETCoreSdkBundledVersionsProps>$(MSBuildThisFileDirectory)..\..\..\Microsoft.NETCoreSdk.BundledVersions.props</NETCoreSdkBundledVersionsProps>
</PropertyGroup>
<Import Project="$(NETCoreSdkBundledVersionsProps)" Condition="Exists('$(NETCoreSdkBundledVersionsProps)')" />
<PropertyGroup>
<!-- Set RuntimeIdentifier graph for NuGet (this needs to be after NETCoreSdkBundledVersionsProps is imported, as that's where
BundledRuntimeIdentifierGraphFile is set. -->
<RuntimeIdentifierGraphPath Condition="'$(RuntimeIdentifierGraphPath)' == ''">$(BundledRuntimeIdentifierGraphFile)</RuntimeIdentifierGraphPath>
</PropertyGroup>
<PropertyGroup>
<!-- Disable web SDK implicit package versions for ASP.NET packages, since the .NET SDK now handles that -->
<EnableWebSdkImplicitPackageVersions>false</EnableWebSdkImplicitPackageVersions>
</PropertyGroup>
<ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' ">
<Compile Include="**/*$(DefaultLanguageSourceExtension)" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition=" '$(EnableDefaultCompileItems)' == 'true' " />
<EmbeddedResource Include="**/*.resx" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition=" '$(EnableDefaultEmbeddedResourceItems)' == 'true' " />
</ItemGroup>
<ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' And '$(EnableDefaultNoneItems)' == 'true' ">
<None Include="**/*" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<None Remove="**/*$(DefaultLanguageSourceExtension)" />
<None Remove="**/*.resx" />
</ItemGroup>
<!-- Automatically reference NETStandard.Library or Microsoft.NETCore.App package if targeting the corresponding target framework.
We can refer here in the .props file to properties set in the .targets files because items and their conditions are
evaluated in the second pass of evaluation, after all properties have been evaluated. -->
<ItemGroup Condition=" '$(DisableImplicitFrameworkReferences)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETStandard' And '$(_TargetFrameworkVersionWithoutV)' < '2.1'">
<PackageReference Include="NETStandard.Library" Version="$(NETStandardImplicitPackageVersion)" IsImplicitlyDefined="true" />
<!-- If targeting .NET Standard 2.0 or higher, then don't include a dependency on NETStandard.Library in the package produced by pack -->
<PackageReference Update="NETStandard.Library"
Condition=" ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '2.0') "
PrivateAssets="All"
Publish="true" />
</ItemGroup>
<ItemGroup Condition=" '$(DisableImplicitFrameworkReferences)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETStandard' And '$(_TargetFrameworkVersionWithoutV)' >= '2.1'">
<FrameworkReference Include="NETStandard.Library" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All"/>
</ItemGroup>
<ItemGroup Condition=" '$(DisableImplicitFrameworkReferences)' != 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<!-- Use implicit PackageReference for Microsoft.NETCore.App on versions prior to 3.0. For 3.0 or higher, use
an implicit FrameworkReference -->
<PackageReference Include="Microsoft.NETCore.App" IsImplicitlyDefined="true"
Condition="('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' < '3.0')"/>
<!-- For targeting .NET Core 2.0 or higher, don't include a dependency on Microsoft.NETCore.App in the package produced by pack.
Packing an DotnetCliTool should include the Microsoft.NETCore.App package dependency. -->
<PackageReference Update="Microsoft.NETCore.App"
Condition="('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '2.0') And ('$(PackageType)' != 'DotnetCliTool')"
PrivateAssets="All"
Publish="true" />
<FrameworkReference Include="Microsoft.NETCore.App" IsImplicitlyDefined="true"
Pack="false"
PrivateAssets="All"
Condition="('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.0')"/>
<!-- Allow opt-in to Mono runtime pack for .NET 6.0 or higher -->
<FrameworkReference Update="Microsoft.NETCore.App"
RuntimePackLabels="Mono"
Condition="'$(UseMonoRuntime)' == 'true' And ('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '6.0')" />
</ItemGroup>
<!-- Implicit imports -->
<ItemGroup Condition=" '$(DisableImplicitNamespaceImports_DotNet)' != 'true'
and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '6.0'))">
<!-- Imports already defined as VB implicit imports are conditioned to not be added twice -->
<Import Include="System" Condition="'$(Language)' != 'VB'" />
<Import Include="System.Collections.Generic" Condition="'$(Language)' != 'VB'" />
<Import Include="System.IO" />
<Import Include="System.Linq" Condition="'$(Language)' != 'VB'" />
<Import Include="System.Net.Http" />
<Import Include="System.Threading" />
<Import Include="System.Threading.Tasks" Condition="'$(Language)' != 'VB'" />
</ItemGroup>
<!-- VB implicit imports -->
<ItemGroup Condition=" '$(DisableImplicitNamespaceImports)' != 'true'
and '$(Language)' == 'VB'
and '$(TargetFrameworkIdentifier)' == '.NETFramework'">
<!-- These namespaces are present in 2.0 Framework assemblies -->
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<!-- These namespaces are introduced in 3.5 Framework assemblies -->
<Import Include="System.Linq" Condition="('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.5')"/>
<Import Include="System.Xml.Linq" Condition="('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '3.5')"/>
<!-- This namespace is introduced in 4.0 Framework assemblies -->
<Import Include="System.Threading.Tasks" Condition="('$(_TargetFrameworkVersionWithoutV)' != '') And ('$(_TargetFrameworkVersionWithoutV)' >= '4.0')"/>
</ItemGroup>
<ItemGroup Condition=" '$(DisableImplicitNamespaceImports)' != 'true'
and '$(Language)' == 'VB'
and '$(_IsNETCoreOrNETStandard)' == 'true'">
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
</Project>