/
WinRT.Runtime.csproj
89 lines (78 loc) · 3.92 KB
/
WinRT.Runtime.csproj
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(LibBuildTFMs)</TargetFrameworks>
<RootNamespace>WinRT</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>11.0</LangVersion>
<DebugType>full</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>
<AssemblyVersion>$(AssemblyVersionNumber)</AssemblyVersion>
<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>
</PropertyGroup>
<ItemGroup>
<Compile Include="../cswinrt/strings/WinRT*.cs" Link="cswinrt/%(FileName)%(Extension)" />
</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" Version="4.5.4" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="System.Runtime.Extensions" Version="4.3.1" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" 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.0.0</CsWinRTApiCompatVersion>
<ApiCompatArgs>$(ApiCompatArgs) --allow-default-interface-methods</ApiCompatArgs>
<MatchingRefApiCompatArgs>$(MatchingRefApiCompatArgs) --allow-default-interface-methods</MatchingRefApiCompatArgs>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20560.3" PrivateAssets="All" />
<PackageDownload Include="Microsoft.Windows.CsWinRT" Version="[$(CsWinRTApiCompatVersion)]" />
</ItemGroup>
<ItemGroup>
<Compile Update="WinRTRuntimeErrorStrings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>WinRTRuntimeErrorStrings.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="WinRTRuntimeErrorStrings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>WinRTRuntimeErrorStrings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Target Name="_ResolveResolvedMatchingContract" BeforeTargets="ValidateApiCompatForSrc;RunMatchingRefApiCompat" Condition="'$(TargetFramework)' == 'net6.0'">
<ItemGroup>
<_ReferencePathDirectories Include="@(ReferencePath -> '%(RootDir)%(Directory)')" />
<ResolvedMatchingContract Include="$(NuGetPackageRoot)\Microsoft.Windows.CsWinRT\$(CsWinRTApiCompatVersion)\lib\net6.0\$(TargetFileName)">
<DependencyPaths>@(_ReferencePathDirectories->Distinct(), ',')</DependencyPaths>
</ResolvedMatchingContract>
</ItemGroup>
</Target>
</Project>