Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SupportedOSPlatforms property to generate assembly attributes #41209

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions eng/versioning.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,25 @@
</AssemblyMetadata>
</ItemGroup>

<!-- Adds SupportedOSPlatform attribute for Windows Specific libraries -->
<ItemGroup Condition="'$(IsWindowsSpecific)' == 'true' and '$(IsTestProject)' != 'true'">
<AssemblyAttribute Include="System.Runtime.Versioning.SupportedOSPlatform">
<_Parameter1>windows</_Parameter1>
</AssemblyAttribute>
<!-- Adds SupportedOSPlatform or UnsupportedOSPlatform attributes -->
<ItemGroup Condition="'$(IsTestProject)' != 'true'">
<_supportedOSPlatforms Include="$(AssemblySupportedOSPlatformAttributes)" />
<_unsupportedOSPlatforms Include="$(AssemblyUnsupportedOSPlatformAttributes)" Condition="'$(_assemblySupportedOSPlatformAttributesOverride)' != 'true'" />
</ItemGroup>

<ItemGroup>
<_unsupportedOSPlatforms Include="$(UnsupportedOSPlatforms)" />
</ItemGroup>

<Target Name="AddUnsupportedOSPlatformAttribute" BeforeTargets="GenerateAssemblyInfo" AfterTargets="PrepareForBuild">
<Target Name="AddAssemblyOSPlatformAttributes" BeforeTargets="GenerateAssemblyInfo" AfterTargets="PrepareForBuild">
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.Versioning.UnsupportedOSPlatform" Condition="'@(_unsupportedOSPlatforms)' != ''">
<!-- When there are Supported OSPlatforms, transform each of those into an attribute -->
<AssemblyAttribute Include="System.Runtime.Versioning.SupportedOSPlatform" Condition="'@(_supportedOSPlatforms)' != ''">
<_Parameter1>%(_supportedOSPlatforms.Identity)</_Parameter1>
</AssemblyAttribute>
jeffhandley marked this conversation as resolved.
Show resolved Hide resolved
<!-- When there are not any Supported OSPlatforms, but there are Unsupported OSPlatforms, transform each of those into an attribute -->
<AssemblyAttribute Include="System.Runtime.Versioning.UnsupportedOSPlatform" Condition="'@(_supportedOSPlatforms)' == '' and '@(_unsupportedOSPlatforms)' != ''">
<_Parameter1>%(_unsupportedOSPlatforms.Identity)</_Parameter1>
</AssemblyAttribute>
jeffhandley marked this conversation as resolved.
Show resolved Hide resolved
Comment on lines +38 to 40
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we produce a build warning when both $(SupportedOSPlatforms) and $(UnsupportedOSPlatforms) are set? Those are mutual exclusive choices, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea

</ItemGroup>
<Warning Condition="'@(_supportedOSPlatforms)' != '' and '@(_unsupportedOSPlatforms)' != ''"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just Error. We set warnAsError for the global build, so it is the same, we usually try to error for this kind of stuff as warnings could slip sometimes.

Text="The 'AssemblySupportedOSPlatformAttributes' and 'AssemblyUnsupportedOSPlatformAttributes' properties cannot both be defined; only the AssemblySupportedOSPlatformAttributes was used." />
</Target>

<Target Name="DecideIfWeNeedToIncludeDllSafeSearchPathAttribute"
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@

<!-- Adds System.Runtime.Versioning*Platform* annotation attributes to < .NET 5 builds -->
<Choose>
<When Condition="('$(IncludePlatformAttributes)' == 'true' or '$(IsWindowsSpecific)' == 'true') and ('$(TargetFrameworkIdentifier)' != '.NETCoreApp' or $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '5.0')))">
<When Condition="('$(IncludePlatformAttributes)' == 'true' or '$(AssemblySupportedOSPlatformAttributes)' != '' or '$(AssemblyUnsupportedOSPlatformAttributes)' != '') and ('$(TargetFrameworkIdentifier)' != '.NETCoreApp' or $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '5.0')))">
<ItemGroup>
<Compile Include="$(CoreLibSharedDir)System\Runtime\Versioning\PlatformAttributes.cs" Link="System\Runtime\Versioning\PlatformAttributes.cs" />
</ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/libraries/Microsoft.Extensions.Hosting/src/Host.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ public static IHostBuilder CreateDefaultBuilder(string[] args)

if (isWindows)
{
#pragma warning disable CA1416 // Platform compat analyzer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary? isWindows is defined above as:

bool isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);

Can the analyzer not recognize this pattern?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Analyzer can track result save in local, it shouldn't warn

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was warning on this. Remind me; can the analyzer also recognize the old RuntimeInformation.IsOSPlatform() calls like this one? This branch is still intact despite the PR being close. Could you pull the branch down and check this scenario please, @buyaa-n?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the analyzer also recognize the old RuntimeInformation.IsOSPlatform()

Yes it can

It was warning on this.

That is strange, i added exact same test and it is not warning

This branch is still intact despite the PR being close. Could you pull the branch down and check this scenario please, @buyaa-n?

Sure

Copy link
Member

@buyaa-n buyaa-n Aug 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed an issue for the bug dotnet/roslyn-analyzers#4090

// Add the EventLogLoggerProvider on windows machines
logging.AddEventLog();
#pragma warning restore CA1416 // Platform compat analyzer

}

logging.Configure(options =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
<ItemGroup>
<Compile Include="Microsoft.Extensions.Logging.EventLog.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<EnableDefaultItems>true</EnableDefaultItems>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
3 changes: 1 addition & 2 deletions src/libraries/System.Data.Odbc/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/libraries/System.Data.OleDb/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
to a different assembly. -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<StrongNameKeyId>ECMA</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
to a different assembly. -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
to a different assembly. -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
3 changes: 1 addition & 2 deletions src/libraries/System.Drawing.Common/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
3 changes: 1 addition & 2 deletions src/libraries/System.IO.Ports/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/libraries/System.Management/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
to a different assembly. -->
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
3 changes: 1 addition & 2 deletions src/libraries/System.Net.Mail/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
3 changes: 1 addition & 2 deletions src/libraries/System.Net.Ping/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
3 changes: 1 addition & 2 deletions src/libraries/System.Net.Requests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
3 changes: 1 addition & 2 deletions src/libraries/System.Net.Security/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
5 changes: 2 additions & 3 deletions src/libraries/System.Net.Sockets/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ public static TcpListener Create(int port)
return listener;
}

[SupportedOSPlatform("windows")]
private void SetIPProtectionLevel(bool allowed)
=> _serverSocket!.SetIPProtectionLevel(allowed ? IPProtectionLevel.Unrestricted : IPProtectionLevel.EdgeRestricted);

Expand All @@ -274,7 +275,7 @@ private void CreateNewSocketIfNeeded()
_serverSocket.ExclusiveAddressUse = true;
}

if (_allowNatTraversal != null)
if (_allowNatTraversal != null && OperatingSystem.IsWindows())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we concerned about behavior change here at all? Previously someone would get a PNSE during socket creation, if they called TCPListener.AllowNatTraversal(bool allowed). Now it looks like it will no longer PNSE.

{
SetIPProtectionLevel(_allowNatTraversal.GetValueOrDefault());
_allowNatTraversal = null; // Reset value to avoid affecting more sockets
Expand Down
3 changes: 1 addition & 2 deletions src/libraries/System.Net.WebClient/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>windows;browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>windows;browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsWindowsSpecific>true</IsWindowsSpecific>
<AssemblySupportedOSPlatformAttributes>windows</AssemblySupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
<AssemblyUnsupportedOSPlatformAttributes>browser</AssemblyUnsupportedOSPlatformAttributes>
</PropertyGroup>
</Project>
Loading