-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathWinRT.Runtime.csproj
More file actions
112 lines (97 loc) · 5.05 KB
/
WinRT.Runtime.csproj
File metadata and controls
112 lines (97 loc) · 5.05 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
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(LibBuildTFMs)</TargetFrameworks>
<RootNamespace>WinRT</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>11.0</LangVersion>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<Authors>Microsoft Corporation</Authors>
<Company>Microsoft Corporation</Company>
<Product>C#/WinRT</Product>
<PackageId>WinRT.Runtime</PackageId>
<FileVersion>$(VersionNumber)</FileVersion>
<Version>$(VersionNumber)</Version>
<InformationalVersion>$(VersionNumber)</InformationalVersion>
<NeutralLanguage>en</NeutralLanguage>
<Description>C#/WinRT Runtime v$(VersionString)</Description>
<AssemblyTitle>C#/WinRT Runtime v$(VersionString)</AssemblyTitle>
<Copyright>Copyright (c) Microsoft Corporation. All rights reserved.</Copyright>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<IsTrimmable>true</IsTrimmable>
<DefineConstants>$(DefineConstants);CsWinRT_LANG_11_FEATURES</DefineConstants>
<!-- Set remote for source link. -->
<AdoMirrorBuild Condition="'$(AdoMirrorBuild)' == ''">false</AdoMirrorBuild>
<GitRepositoryRemoteName Condition="$(AdoMirrorBuild)">github</GitRepositoryRemoteName>
<!-- Suppress warnings for using 'ref' as 'in', to simplify multi-targeting -->
<NoWarn>$(NoWarn);CS9191</NoWarn>
</PropertyGroup>
<!-- Configure the assembly version as needed -->
<PropertyGroup>
<AssemblyVersion>$(AssemblyVersionNumber)</AssemblyVersion>
</PropertyGroup>
<!-- NativeAOT specific options, only starting from .NET 8 -->
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>
<!-- Include the ILLink file (to properly trim configuration switches in publish builds) -->
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
<EmbeddedResource Include="Configuration\ILLink.Substitutions.xml" LogicalName="ILLink.Substitutions.xml" />
</ItemGroup>
<!-- Import all .tt files with their generated .g.cs files (the T4 service is imported in the .props file) -->
<ItemGroup>
<None Update="**\*.tt">
<LastGenOutput>%(Filename).g.cs</LastGenOutput>
<Generator>TextTemplatingFileGenerator</Generator>
</None>
<Compile Update="**\*.g.cs">
<DependentUpon>$([System.IO.Path]::GetFileNameWithoutExtension('%(Filename)')).tt</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="../cswinrt/strings/InitializeProjection.cs" Link="cswinrt/InitializeProjection.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Compile Remove="**/*.net5.cs" />
<None Include="**/*.net5.cs" />
</ItemGroup>
<ItemGroup Condition="$(IsTargetFrameworkNet5OrGreater)">
<Compile Remove="**/*.netstandard2.0.cs" />
<None Include="**/*.netstandard2.0.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Memory" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="System.Runtime.Extensions" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
<!-- API Compat -->
<PropertyGroup>
<!-- Checks for both breaking changes and for new API additions. -->
<RunApiCompatForSrc>true</RunApiCompatForSrc>
<RunMatchingRefApiCompat>true</RunMatchingRefApiCompat>
<ApiCompatEnforceOptionalRules>true</ApiCompatEnforceOptionalRules>
<CsWinRTApiCompatVersion>2.1.1</CsWinRTApiCompatVersion>
<ApiCompatArgs>$(ApiCompatArgs) --allow-default-interface-methods</ApiCompatArgs>
<MatchingRefApiCompatArgs>$(MatchingRefApiCompatArgs) --allow-default-interface-methods</MatchingRefApiCompatArgs>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.DotNet.ApiCompat" PrivateAssets="All" />
<PackageDownload Include="Microsoft.Windows.CsWinRT" Version="[$(CsWinRTApiCompatVersion)]" />
</ItemGroup>
<!-- T4 template generation service (the .tt/.g.cs files are resolved in the .targets file) -->
<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>
<Target Name="_ResolveResolvedMatchingContract" BeforeTargets="ValidateApiCompatForSrc;RunMatchingRefApiCompat" Condition="'$(TargetFramework)' == 'net8.0'">
<ItemGroup>
<_ReferencePathDirectories Include="@(ReferencePath -> '%(RootDir)%(Directory)')" />
<ResolvedMatchingContract Include="$(NuGetPackageRoot)\Microsoft.Windows.CsWinRT\$(CsWinRTApiCompatVersion)\lib\$(TargetFramework)\$(TargetFileName)">
<DependencyPaths>@(_ReferencePathDirectories->Distinct(), ',')</DependencyPaths>
</ResolvedMatchingContract>
</ItemGroup>
</Target>
</Project>