diff options
author | Buyaa <bunamnan@microsoft.com> | 2020-10-17 02:39:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-17 02:39:19 +0300 |
commit | 5d702f87681f35cb019560075374346992bbde14 (patch) | |
tree | 645d894b1428b6c729b6c9ab41710217a4edf474 /eng/versioning.targets | |
parent | 75090807267d3a06c9ad806c6d33e773f69675bc (diff) |
Fix new warnings (#43097)
* Fix CA1416 warnings in runtime repo
Diffstat (limited to 'eng/versioning.targets')
-rw-r--r-- | eng/versioning.targets | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/eng/versioning.targets b/eng/versioning.targets index efb7af48b76..61789747403 100644 --- a/eng/versioning.targets +++ b/eng/versioning.targets @@ -22,8 +22,8 @@ </AssemblyMetadata> </ItemGroup> - <!-- Adds SupportedOSPlatform attribute for Windows Specific libraries --> - <ItemGroup Condition="'$(IsWindowsSpecific)' == 'true' and '$(IsTestProject)' != 'true'"> + <!-- Adds SupportedOSPlatform attribute for Windows Specific libraries and Windows targets --> + <ItemGroup Condition="('$(IsWindowsSpecific)' == 'true' or '$(TargetsWindows)' == 'true') and '$(IsTestProject)' != 'true'"> <AssemblyAttribute Include="System.Runtime.Versioning.SupportedOSPlatform"> <_Parameter1>windows</_Parameter1> </AssemblyAttribute> @@ -33,9 +33,9 @@ <_unsupportedOSPlatforms Include="$(UnsupportedOSPlatforms)" /> </ItemGroup> - <Target Name="AddUnsupportedOSPlatformAttribute" BeforeTargets="GenerateAssemblyInfo" AfterTargets="PrepareForBuild"> + <Target Name="AddUnsupportedOSPlatformAttribute" BeforeTargets="GenerateAssemblyInfo" AfterTargets="PrepareForBuild" Condition="'@(_unsupportedOSPlatforms)' != '' and '$(IsTestProject)' != 'true'"> <ItemGroup> - <AssemblyAttribute Include="System.Runtime.Versioning.UnsupportedOSPlatform" Condition="'@(_unsupportedOSPlatforms)' != ''"> + <AssemblyAttribute Include="System.Runtime.Versioning.UnsupportedOSPlatform"> <_Parameter1>%(_unsupportedOSPlatforms.Identity)</_Parameter1> </AssemblyAttribute> </ItemGroup> |