|
2 | 2 |
|
3 | 3 | <PropertyGroup> |
4 | 4 | <!-- |
5 | | - Multitarget .NET 9 and .NET Framework 4.72 on Windows 11 or higher. |
6 | | - https://learn.microsoft.com/dotnet/standard/frameworks |
7 | | -
|
8 | | - Because we're multitargeting, we need to specify SupportedPlatform |
9 | | - to get proper platform compatibility warnings. |
| 5 | + Because we're multitargeting, we need to specify SupportedPlatform to get proper platform compatibility warnings. |
10 | 6 | https://learn.microsoft.com/dotnet/standard/analyzers/platform-compat-analyzer |
11 | 7 |
|
12 | | - Including just net9.0 if users want to build for .NET 9 and do a runtime check. |
| 8 | + Including platform specific and non-platform specific target frameworks to allow use with a runtime check. |
13 | 9 | --> |
14 | | - <TargetFrameworks>net9.0-windows10.0.22000.0;net9.0;net472</TargetFrameworks> |
15 | | - <SupportedPlatform>windows10.0.22000.0</SupportedPlatform> |
| 10 | + <TargetFrameworks>$(DotNetCoreVersion)-$(WindowsPlatformVersion);$(DotNetCoreVersion);$(DotNetFrameworkVersion)</TargetFrameworks> |
| 11 | + <SupportedPlatform>$(WindowsPlatformVersion)</SupportedPlatform> |
16 | 12 |
|
17 | | - <!-- Ignore checking for compatibilty when targetting .NET 9 without the windows qualifier --> |
18 | | - <NoWarn Condition="'$(TargetFramework)' == 'net9.0'">$(NoWarn);CA1416</NoWarn> |
| 13 | + <!-- Ignore checking for compatibilty when targetting .NET Core without the windows qualifier --> |
| 14 | + <NoWarn Condition="'$(TargetFramework)' == '$(DotNetCoreVersion)'">$(NoWarn);CA1416</NoWarn> |
19 | 15 |
|
20 | 16 | <!-- |
21 | | - We don't want to have implicit usings as we're retargeting System.IO to Microsoft.IO |
22 | | - in our GlobalUsings.cs file for .NET 4.7.2. |
| 17 | + We don't want to have implicit usings as we're retargeting System.IO to Microsoft.IO |
| 18 | + in our GlobalUsings.cs file for .NET 4.7.2. |
23 | 19 | --> |
24 | 20 | <ImplicitUsings>disable</ImplicitUsings> |
25 | 21 | <Nullable>enable</Nullable> |
|
34 | 30 | <!-- |
35 | 31 | Modifying default items to exclude the Framework items if not building for .NET Framework. |
36 | 32 | --> |
37 | | - <DefaultItemExcludes Condition="'$(TargetFramework)' != 'net472'">$(DefaultItemExcludes);**/Framework/**/*</DefaultItemExcludes> |
| 33 | + <DefaultItemExcludes Condition="'$(TargetFramework)' != '$(DotNetFrameworkVersion)'">$(DefaultItemExcludes);**/Framework/**/*</DefaultItemExcludes> |
38 | 34 | </PropertyGroup> |
39 | 35 |
|
40 | | - <ItemGroup Condition="'$(TargetFramework)' != 'net472'"> |
| 36 | + <ItemGroup Condition="'$(TargetFramework)' != '$(DotNetFrameworkVersion)'"> |
41 | 37 | <!-- Include the Framework specific items as none so we can see them easily in the Solution Explorer. --> |
42 | 38 | <None Include="**/Framework/**/*" /> |
43 | 39 | </ItemGroup> |
44 | 40 |
|
45 | 41 | <ItemGroup> |
46 | | - <PackageReference Include="KlutzyNinja.Madowaku" Version="0.1.0-alpha.2" /> |
47 | | - <PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183"> |
48 | | - <PrivateAssets>all</PrivateAssets> |
49 | | - <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
50 | | - </PackageReference> |
| 42 | + <Compile Remove="Framework\**" /> |
| 43 | + <EmbeddedResource Remove="Framework\**" /> |
| 44 | + <None Remove="Framework\**" /> |
51 | 45 | </ItemGroup> |
52 | 46 |
|
53 | 47 | <ItemGroup> |
54 | | - <Folder Include="Framework\" /> |
| 48 | + <PackageReference Include="KlutzyNinja.Madowaku" /> |
| 49 | + <PackageReference Include="Microsoft.Windows.CsWin32"> |
| 50 | + <PrivateAssets>all</PrivateAssets> |
| 51 | + <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
| 52 | + </PackageReference> |
55 | 53 | </ItemGroup> |
56 | 54 |
|
57 | 55 | <!-- |
|
78 | 76 | SourceLink related |
79 | 77 | --> |
80 | 78 | <ItemGroup> |
81 | | - <PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" /> |
| 79 | + <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> |
82 | 80 | </ItemGroup> |
83 | 81 | <PropertyGroup> |
84 | 82 | <!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) --> |
|
102 | 100 | <MinVerTagPrefix>v</MinVerTagPrefix> |
103 | 101 | </PropertyGroup> |
104 | 102 | <ItemGroup> |
105 | | - <PackageReference Include="MinVer" Version="6.0.0"> |
| 103 | + <PackageReference Include="MinVer"> |
106 | 104 | <PrivateAssets>all</PrivateAssets> |
107 | 105 | <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
108 | 106 | </PackageReference> |
|
0 commit comments