Skip to content

Commit d9fe14b

Browse files
committed
Mark System.Security.Cryptography.OpenSsl as unsupported on browser
1 parent 0d6d73a commit d9fe14b

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

eng/versioning.targets

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,18 @@
2929
</AssemblyAttribute>
3030
</ItemGroup>
3131

32-
<!-- Adds UnsupportedOSPlatform attribute for requested libraries -->
33-
<ItemGroup Condition="'$(UnsupportedOSPlatform)' != '' and '$(IsTestProject)' != 'true'">
34-
<AssemblyAttribute Include="System.Runtime.Versioning.UnsupportedOSPlatform">
35-
<_Parameter1>$(UnsupportedOSPlatform)</_Parameter1>
36-
</AssemblyAttribute>
32+
<ItemGroup>
33+
<_unsupportedOSPlatforms Include="$(UnsupportedOSPlatforms)" />
3734
</ItemGroup>
3835

36+
<Target Name="AddUnsupportedOSPlatformAttribute" BeforeTargets="GenerateAssemblyInfo" AfterTargets="PrepareForBuild">
37+
<ItemGroup>
38+
<AssemblyAttribute Include="System.Runtime.Versioning.UnsupportedOSPlatform" Condition="'@(_unsupportedOSPlatforms)' != ''">
39+
<_Parameter1>%(_unsupportedOSPlatforms.Identity)</_Parameter1>
40+
</AssemblyAttribute>
41+
</ItemGroup>
42+
</Target>
43+
3944
<Target Name="DecideIfWeNeedToIncludeDllSafeSearchPathAttribute"
4045
Condition="'$(IsDotNetFrameworkProductAssembly)' == 'true' and '$(IsTestProject)' != 'true' and '$(IsTestSupportProject)' != 'true'">
4146

src/libraries/System.Security.Cryptography.OpenSsl/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<PropertyGroup>
44
<StrongNameKeyId>Microsoft</StrongNameKeyId>
55
<IncludePlatformAttributes>true</IncludePlatformAttributes>
6-
<UnsupportedOSPlatform>windows</UnsupportedOSPlatform>
6+
<UnsupportedOSPlatforms>windows;browser</UnsupportedOSPlatforms>
77
</PropertyGroup>
88
</Project>

0 commit comments

Comments
 (0)