未验证 提交 61587f4f 编写于 作者: B Buyaa Namnan 提交者: GitHub

Add PlatformNeutralAssembly property for targeted builds of cross platform assembly (#53626)

上级 15eca914
......@@ -45,7 +45,7 @@
<MicrosoftCodeAnalysisVersion>3.8.0</MicrosoftCodeAnalysisVersion>
</PropertyGroup>
<PropertyGroup>
<MicrosoftCodeAnalysisNetAnalyzersVersion>6.0.0-preview6.21274.2</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftCodeAnalysisNetAnalyzersVersion>6.0.0-preview6.21281.1</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftCodeAnalysisCSharpCodeStyleVersion>3.10.0-2.final</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
<MicrosoftCodeAnalysisCSharpVersion>3.10.0-2.final</MicrosoftCodeAnalysisCSharpVersion>
<!-- Arcade dependencies -->
......
......@@ -84,6 +84,11 @@
</ItemGroup>
</Target>
<!-- Add PlatformNeutralAssembly property for targeted builds of cross platform assemblies -->
<ItemGroup Condition="'$(TargetsAnyOS)' != 'true' and '$(IsTestProject)' != 'true' and '@(SupportedOSPlatforms)' == ''">
<CompilerVisibleProperty Include="PlatformNeutralAssembly" />
</ItemGroup>
<PropertyGroup>
<!-- corefx has never generated these attributes so don't let the SDK generate them -->
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
......
......@@ -101,7 +101,6 @@ private static async ValueTask<SslStream> EstablishSslConnectionAsyncCore(bool a
return sslStream;
}
// TODO: SupportedOSPlatform doesn't work for internal APIs https://github.com/dotnet/runtime/issues/51305
[SupportedOSPlatform("windows")]
[SupportedOSPlatform("linux")]
[SupportedOSPlatform("macos")]
......
......@@ -14,7 +14,6 @@
namespace System.Net.Http
{
// TODO: SupportedOSPlatform doesn't work for internal APIs https://github.com/dotnet/runtime/issues/51305
[SupportedOSPlatform("windows")]
[SupportedOSPlatform("linux")]
[SupportedOSPlatform("macos")]
......
......@@ -7,7 +7,6 @@
namespace System.Net.Http
{
[Serializable]
// TODO: SupportedOSPlatform doesn't work for internal APIs https://github.com/dotnet/runtime/issues/51305
[SupportedOSPlatform("windows")]
[SupportedOSPlatform("linux")]
[SupportedOSPlatform("macos")]
......
......@@ -7,7 +7,6 @@
namespace System.Net.Http
{
[Serializable]
// TODO: SupportedOSPlatform doesn't work for internal APIs https://github.com/dotnet/runtime/issues/51305
[SupportedOSPlatform("windows")]
[SupportedOSPlatform("linux")]
[SupportedOSPlatform("macos")]
......
......@@ -16,7 +16,6 @@
namespace System.Net.Http
{
// TODO: SupportedOSPlatform doesn't work for internal APIs https://github.com/dotnet/runtime/issues/51305
[SupportedOSPlatform("windows")]
[SupportedOSPlatform("linux")]
[SupportedOSPlatform("macos")]
......
......@@ -664,7 +664,6 @@ private void AddHttp2Connection(Http2Connection newConnection)
}
}
// TODO: SupportedOSPlatform doesn't work for internal APIs https://github.com/dotnet/runtime/issues/51305
[SupportedOSPlatform("windows")]
[SupportedOSPlatform("linux")]
[SupportedOSPlatform("macos")]
......@@ -764,7 +763,6 @@ private async ValueTask<Http3Connection> GetHttp3ConnectionAsync(HttpRequestMess
}
// Returns null if HTTP3 cannot be used.
// TODO: SupportedOSPlatform doesn't work for internal APIs https://github.com/dotnet/runtime/issues/51305
[SupportedOSPlatform("windows")]
[SupportedOSPlatform("linux")]
[SupportedOSPlatform("macos")]
......
......@@ -187,7 +187,6 @@ private static bool AllowDraftHttp3
private byte[]? _http3SettingsFrame;
// TODO: SupportedOSPlatform doesn't work for internal APIs https://github.com/dotnet/runtime/issues/51305
[SupportedOSPlatform("windows")]
[SupportedOSPlatform("linux")]
[SupportedOSPlatform("macos")]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册