-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Microsoft.NET.Sdk.Web.ProjectSystem.targets
107 lines (89 loc) · 6.87 KB
/
Microsoft.NET.Sdk.Web.ProjectSystem.targets
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
<!--
***********************************************************************************************
Microsoft.NET.Sdk.Web.ProjectSystem.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 xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets"
Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets') AND '$(EnableTypeScriptNuGetTarget)' != 'true'"/>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.DotNetCore.targets"
Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.DotNetCore.targets') AND '$(EnableTypeScriptNuGetTarget)' != 'true'"/>
<PropertyGroup>
<RunWorkingDirectory Condition=" '$(RunWorkingDirectory)' == '' and '$(EnableDefaultRunWorkingDirectory)' != 'false' ">$(MSBuildProjectDirectory)</RunWorkingDirectory>
<MSBuildWebTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed.Web\</MSBuildWebTargetsPath>
<AspNetCoreHostingModel Condition="'$(AspNetCoreHostingModel)' == '' And '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' != '' And '$(_TargetFrameworkVersionWithoutV)' >= '3.0' ">inprocess</AspNetCoreHostingModel>
<AspNetCoreModuleName Condition="'$(AspNetCoreModuleName)' == '' And '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' != '' And '$(_TargetFrameworkVersionWithoutV)' >= '3.0' ">AspNetCoreModuleV2</AspNetCoreModuleName>
</PropertyGroup>
<ItemGroup>
<ProjectCapability Include="DotNetCoreWeb" />
<ProjectCapability Include="AspNetCore" />
<ProjectCapability Include="Web" />
<ProjectCapability Include="AppServicePublish" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' != '' And '$(_TargetFrameworkVersionWithoutV)' >= '3.0' ">
<ProjectCapability Include="AspNetCoreInProcessHosting" />
</ItemGroup>
<PropertyGroup>
<!--
ASP.NET 5.0+ explicitly disables this functionality by default, requiring the app author
to opt-in to re-enabling the feature. The way to opt back in is to specify the below
element with the value "true". This functionality is disabled across most project types
by default in .NET 8; however, we need to keep the line below since it's not conditioned
on a version check like the normal SDK targets logic is.
-->
<EnableUnsafeBinaryFormatterSerialization Condition="'$(EnableUnsafeBinaryFormatterSerialization)' == ''">false</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>
<!-- Default settings for aot'd apps. -->
<PropertyGroup Condition="'$(PublishAot)' == 'true'">
<!-- Enable System.GC.DynamicAdaptationMode by default for aot'd apps to get a GC that dynamically adapts to the application's memory use. -->
<GarbageCollectionAdaptationMode Condition="'$(GarbageCollectionAdaptationMode)' == '' And '$(ServerGarbageCollection)' == 'true'">1</GarbageCollectionAdaptationMode>
</PropertyGroup>
<!-- Default settings for trimmed apps. -->
<PropertyGroup Condition="'$(PublishTrimmed)' == 'true' Or '$(PublishAot)' == 'true'">
<!-- Enable the built-in source generators. -->
<EnableRequestDelegateGenerator Condition="'$(EnableRequestDelegateGenerator)' == ''">true</EnableRequestDelegateGenerator>
<EnableConfigurationBindingGenerator Condition="'$(EnableConfigurationBindingGenerator)' == ''">true</EnableConfigurationBindingGenerator>
</PropertyGroup>
<PropertyGroup>
<!-- Set the namespaces emitted by the RequestDelegateGenerator for interception when applicable. -->
<InterceptorsPreviewNamespaces Condition="'$(EnableRequestDelegateGenerator)' == 'true'">$(InterceptorsPreviewNamespaces);Microsoft.AspNetCore.Http.Generated</InterceptorsPreviewNamespaces>
<!-- Set the namespaces emitted by the ConfigurationBindingGenerator for interception when applicable. -->
<InterceptorsPreviewNamespaces Condition="'$(EnableConfigurationBindingGenerator)' == 'true'">$(InterceptorsPreviewNamespaces);Microsoft.Extensions.Configuration.Binder.SourceGeneration</InterceptorsPreviewNamespaces>
</PropertyGroup>
<!--
Newer versions of Visual Studio ship the designtime related properties in a targets file and all future design time only elements should be added there. If that file does not
exist, it falls back to the default set of values defined here.
-->
<Import Project="$(MSBuildWebTargetsPath)Microsoft.Web.Designtime.targets" Condition="Exists('$(MSBuildWebTargetsPath)Microsoft.Web.Designtime.targets')" />
<Choose>
<When Condition="!Exists('$(MSBuildWebTargetsPath)Microsoft.Web.Designtime.targets')" >
<PropertyGroup>
<ActualLangName Condition="Exists('$(MSBuildWebTargetsPath)$(LangName)')">$(LangName)</ActualLangName>
<ActualLangName Condition="'$(ActualLangName)' == ''">en-us</ActualLangName>
</PropertyGroup>
<!-- Web project capabilities that enables web features in VS for .NET Core projects -->
<ItemGroup>
<ProjectCapability Include="SupportHierarchyContextSvc" />
<ProjectCapability Include="DynamicDependentFile" />
<ProjectCapability Include="DynamicFileNesting" />
<!--
Enables UI for managing secret values when Microsoft.Extensions.Configuration.UserSecrets 1.x is referenced.
Newer versions of this package include a MSBuild file to set this ProjectCapability, but older versions did not include this.
See https://github.com/aspnet/Configuration/blob/9135af4b4e95c080ca4a9f0e91ba5a0b8a561c96/src/Microsoft.Extensions.Configuration.UserSecrets/build/netstandard1.0/Microsoft.Extensions.Configuration.UserSecrets.targets#L10
-->
<ProjectCapability Include="LocalUserSecrets" Condition=" '$(GenerateUserSecretsAttribute)' == 'true' " />
</ItemGroup>
<!-- Web specific properties -->
<ItemGroup>
<PropertyPageSchema Include="$(MSBuildWebTargetsPath)$(ActualLangName)\GeneralBrowseObject.xaml"
Condition="Exists('$(MSBuildWebTargetsPath)$(ActualLangName)\GeneralBrowseObject.xaml')">
<Context>BrowseObject</Context>
</PropertyPageSchema>
</ItemGroup>
</When>
</Choose>
</Project>