-
Notifications
You must be signed in to change notification settings - Fork 872
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
57 lines (53 loc) · 3.5 KB
/
Copy pathDirectory.Build.targets
File metadata and controls
57 lines (53 loc) · 3.5 KB
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
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<Link>
<EnableCOMDATFolding>false</EnableCOMDATFolding>
<OptimizeReferences>false</OptimizeReferences>
<LinkIncremental>true</LinkIncremental>
</Link>
</ItemDefinitionGroup>
<Import Project="eng\configuration.arm64ec.targets" Condition="'$(Platform)'=='ARM64EC'"/>
<Import Project="eng\sdkconfig.targets" />
<Import Project="eng\crtstl.targets" Condition="('$(UseLocalSDK)' != 'true' and '$(ResourceOnlyDll)' != 'true') and '$(MSBuildProjectExtension)' == '.vcxproj'" />
<Import Project="eng\winuidetails.targets" />
<Import Project="eng\binplace.targets"/>
<Import Project="eng\externalbinaries.targets"/>
<Import Project="eng\midl.targets" Condition="'$(IsWinmdProject)' == 'true'" />
<Import Project="eng\winrtclassregistration.targets" Condition="'$(GenerateWinRTClassRegistration)' == 'true'" />
<Import Project="eng\packaging.targets" />
<Import Project="eng\usexamlcompiler.targets" Condition="'$(UseXamlCompiler)'=='true'" />
<Import Project="eng\testprojects.targets" Condition="'$(TestCode)'=='true'" />
<Import Project="eng\adhocapp.targets" Condition="'$(AdHocApp)'=='true'"/>
<Import Project="eng\graph.targets" Condition="'$(IsGraphBuild)' == 'true'" />
<Import Project="eng\projectcaching.targets" />
<Import Project="eng\lightup.targets" />
<Import Project="$(ProjectRoot)\eng\WebView2ProjectionWorkaround.targets" />
<!--
Since in Directory.Build.props we prevented C++/WinRT from automatically injecting /await, we
need to add /await:strict in order to allow C++17 projects to use C++20-compliant coroutines.
While strictly speaking it's overly broad to enable this for _all_ C++17 projects, there is no
harm in doing so as all the switch does is _enable_ compiler support for coroutines; if a project
doesn't use coroutines then the presence of the switch has no effect.
-->
<ItemDefinitionGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj'">
<ClCompile>
<AdditionalOptions Condition="'%(ClCompile.LanguageStandard)' == 'stdcpp17'">%(AdditionalOptions) /await:strict</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
<!--
Workaround for CS0016 build failures when CodeQL is active in the pipeline.
The CodeQL3000Init task sets the MSBuild property EmitCompilerGeneratedFiles=true so that
Roslyn writes source-generator output to disk for static analysis. The SDK target
CreateCompilerGeneratedFilesOutputPath (in Microsoft.Managed.Core.targets) creates the
required '$(CompilerGeneratedFilesOutputPath)' directory (default: $(IntermediateOutputPath)generated),
but it is wired only to BeforeTargets="CoreCompile".
This is a no-op when CodeQL is not active (EmitCompilerGeneratedFiles is empty/false).
Scoped to C# project files only; XamlPreCompile is C#-specific.
-->
<Target Name="CreateCompilerGeneratedFilesOutputPathBeforeXamlPreCompile"
DependsOnTargets="CreateCompilerGeneratedFilesOutputPath"
BeforeTargets="XamlPreCompile"
Condition="'$(EmitCompilerGeneratedFiles)' == 'true' and '$(MSBuildProjectExtension)' == '.csproj'" />
</Project>