From 86fd7a25e5f1328531aae6523b3d21fc23a57576 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Thu, 30 May 2019 01:05:11 -0400 Subject: [PATCH] Handle nullable attributes on platforms that lack them Commit migrated from https://github.com/dotnet/corefx/commit/b2097cbdcb26f7f317252334ddcce101a20b7f3d --- .../src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj | 3 ++- src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj | 5 ++++- .../System.Data.SqlClient/src/System.Data.SqlClient.csproj | 6 ++++++ .../src/System.Resources.Extensions.csproj | 5 +++-- .../System.Runtime.Extensions/src/System.Runtime.Extensions.csproj | 6 ++++++ 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj b/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj index dff57bc..91dae1b 100644 --- a/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj +++ b/src/libraries/Microsoft.Diagnostics.Tracing.EventSource.Redist/src/Microsoft.Diagnostics.Tracing.EventSource.Redist.csproj @@ -3,7 +3,7 @@ Microsoft.Diagnostics.Tracing.EventSource {0CAF38F5-C7E7-46F2-8F39-C5D57492FF7F} $(NoWarn);CS1573 - $(DefineConstants);NO_EVENTCOMMANDEXECUTED_SUPPORT;ES_BUILD_STANDALONE;FEATURE_MANAGED_ETW;PLATFORM_WINDOWS + $(DefineConstants);NO_EVENTCOMMANDEXECUTED_SUPPORT;ES_BUILD_STANDALONE;FEATURE_MANAGED_ETW;PLATFORM_WINDOWS;INTERNAL_NULLABLE_ATTRIBUTES net461-Windows_NT-Debug;net461-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release enable @@ -25,6 +25,7 @@ + diff --git a/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj b/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj index 3de37e6..3d4a0ea 100644 --- a/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj +++ b/src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj @@ -3,7 +3,7 @@ Microsoft.IO.Redist {FEF5811F-ED50-4407-A6B9-885EBD3206FB} netfx-Debug;netfx-Release - $(DefineConstants);MS_IO_REDIST + $(DefineConstants);MS_IO_REDIST;INTERNAL_NULLABLE_ATTRIBUTES true $(NoWarn);CS1573 false @@ -34,6 +34,9 @@ + + Common\System\Diagnostics\CodeAnalysis\NullableAttributes.cs + Common\System\IO\DriveInfoInternal.Windows.cs diff --git a/src/libraries/System.Data.SqlClient/src/System.Data.SqlClient.csproj b/src/libraries/System.Data.SqlClient/src/System.Data.SqlClient.csproj index a730f2e..44c8cb2 100644 --- a/src/libraries/System.Data.SqlClient/src/System.Data.SqlClient.csproj +++ b/src/libraries/System.Data.SqlClient/src/System.Data.SqlClient.csproj @@ -12,8 +12,14 @@ $(DefineConstants);netstandard $(DefineConstants);netcoreapp $(DefineConstants);FEATURE_TCPKEEPALIVE + $(DefineConstants);INTERNAL_NULLABLE_ATTRIBUTES net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netcoreapp2.1-Unix-Debug;netcoreapp2.1-Unix-Release;netcoreapp2.1-Windows_NT-Debug;netcoreapp2.1-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;netstandard1.2-Debug;netstandard1.2-Release;netstandard1.3-Debug;netstandard1.3-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uap10.0.16299-Windows_NT-Debug;uap10.0.16299-Windows_NT-Release + + + Common\CoreLib\System\Diagnostics\CodeAnalysis\NullableAttributes.cs + + diff --git a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj index aaece98..4903acb 100644 --- a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj +++ b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj @@ -2,7 +2,7 @@ true netstandard-Debug;netstandard-Release - $(DefineConstants);RESOURCES_EXTENSIONS + $(DefineConstants);RESOURCES_EXTENSIONS;INTERNAL_NULLABLE_ATTRIBUTES {6773D354-A573-4D9C-9A67-C7FAE579DA50} @@ -14,6 +14,7 @@ + @@ -22,4 +23,4 @@ - \ No newline at end of file + diff --git a/src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj b/src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj index edcc68b..0ae167b 100644 --- a/src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj +++ b/src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj @@ -9,6 +9,7 @@ true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release enable + $(DefineConstants);INTERNAL_NULLABLE_ATTRIBUTES @@ -179,6 +180,11 @@ Common\System\IO\PersistedFiles.Unix.cs + + + Common\System\Diagnostics\CodeAnalysis\NullableAttributes.cs + + -- 2.7.4