Tweak logic to generate supported OS attributes
このコミットが含まれているのは:
1 親
e4c419d500
コミット
1b355fe32c
6ファイル変更
+14
-8
検索条件に一致するファイルはありません
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<SupportedOSVersion>windows6.1</SupportedOSVersion>
|
||||
<SupportedOSPlatformVersion>6.1</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<SupportedOSVersion>windows6.2</SupportedOSVersion>
|
||||
<SupportedOSPlatformVersion>6.2</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Platforms>AnyCPU;x64;ARM64</Platforms>
|
||||
<SupportedOSVersion>windows6.2</SupportedOSVersion>
|
||||
<SupportedOSPlatformVersion>6.2</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Platforms>AnyCPU;x64;ARM64</Platforms>
|
||||
<SupportedOSVersion>windows6.2</SupportedOSVersion>
|
||||
<SupportedOSPlatformVersion>6.2</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Reference to the main library-->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<SupportedOSVersion>windows6.2</SupportedOSVersion>
|
||||
<SupportedOSPlatformVersion>6.2</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -56,12 +56,18 @@
|
||||
<DisableRuntimeMarshalling>true</DisableRuntimeMarshalling>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Emit the [SupportedOSVersion] attribute if needed -->
|
||||
<!--
|
||||
Emit the [SupportedOSVersion] attribute if needed. Note that the .NET SDK already emits this attribute
|
||||
automatically, but only when targeting the Windows TFM. We use this custom target to emit the same
|
||||
attribute for projects only targeting plain .NET as well. This makes them easier to consume from
|
||||
projects that are not using the Windows TFM as well. Doing so isn't strictly needed anyway unless
|
||||
you're specifically consuming the Windows SDK projections, which those projects are not doing.
|
||||
-->
|
||||
<Target Name="EmitSupportedOSVersionAttributeForTargetOS"
|
||||
BeforeTargets="PrepareForBuild">
|
||||
<ItemGroup Condition="'$(SupportedOSVersion)' != ''">
|
||||
<ItemGroup Condition="'$(SupportedOSPlatformVersion)' != '' AND !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0-windows'))">
|
||||
<AssemblyAttribute Include="System.Runtime.Versioning.SupportedOSPlatformAttribute">
|
||||
<_Parameter1>$(SupportedOSVersion)</_Parameter1>
|
||||
<_Parameter1>Windows$(SupportedOSPlatformVersion)</_Parameter1>
|
||||
</AssemblyAttribute>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする