Tweak logic to generate supported OS attributes
このコミットが含まれているのは:
1 親
e4c419d500
コミット
1b355fe32c
6ファイル変更
+14
-8
検索条件に一致するファイルはありません
@@ -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>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする