Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Hofer <viktor.hofer@microsoft.com>2022-02-12 15:07:16 +0300
committerGitHub <noreply@github.com>2022-02-12 15:07:16 +0300
commit20e8f905d05f2d8f390d0e2ef10f1a4a1289967c (patch)
treed1e2b24f597c5a19cff682e2c18b2fa71e1dfbde
parent55884ce98580d4aa965d1717a62039a4b6d5033b (diff)
Don't use Targets* helper properties in libs (#64500)
* Don't use Targets* helper properties in libs projs This change makes it possible to migrate 200+ (ref+src) projects to use TargetFramework instead of TargetFrameworks which avoids the additional outer build evaluation and invocation which ultimately makes the overall build faster. Targets* properties (i.e. TargetsWindows, TargetsAnyOS, TargetsUnix, etc.) rely on the TargetFramework property which usually are set inside a project. The TargetFramework property is only available before a project specifies it if it's explicitly set in a props file or if the project is cross-targeting and the outer-build dispatches into the inner-build. During the dispatch, the TargetFramework property is passed in as a global property. Until now that behavior wasn't a problem because every libraries project cross-targeted (by setting the TargetFrameworks property) even though many only include a single TargetFramework (i.e. NetCoreAppCurrent). To allow projects to use the TargetFramework property instead of TargetFrameworks, the Targets* helper properties can't be calculated anymore early in a props file as the TargetFramework property isn't set at that time. In general, the guidance by the SDK/msbuild team is to not read from the TargetFramework property before the project sets it (in a property group). That effectively means that the TargetFramework property shouldn't be used in props files at all. Therefore these helper properties can't be used anymore for property conditions and I'm replacing their usage with TargetPlatformIdentifier comparisons for both properties and items. In nearly all cases, the Targets* helper properties can be replaced with TargetPlatformIdentifier checks on items and in the few cases where TargetsUnix or TargetsLinux marks multiple tfms as compatible, the exact tfms must be used instead for the TargetPlatformIdentifier comparison. Whenever a project needs to condition properties on the platform, I'm first setting the TargetPlatformIdentifier the same way the SDK sets it so that the SDK later doesn't need to set it again to avoid the additional expensive msbuild function call. * Use TargetFramework singular to avoid outer builds Use TargetFramework instead of TargetFrameworks property whenever a projects only targets a single target framework. This avoid unnecessary outer builds and evaluations and makes the build faster.
-rw-r--r--Directory.Build.props1
-rw-r--r--docs/coding-guidelines/project-guidelines.md76
-rw-r--r--eng/BeforeTargetFrameworkInference.targets19
-rw-r--r--eng/TraversalSdk.AfterTargets.targets18
-rw-r--r--eng/Version.Details.xml4
-rw-r--r--eng/Versions.props2
-rw-r--r--eng/packaging.targets6
-rw-r--r--eng/targetframeworksuffix.props101
-rw-r--r--eng/testing/tests.props4
-rw-r--r--eng/versioning.targets26
-rw-r--r--src/libraries/Common/tests/Common.Tests.csproj8
-rw-r--r--src/libraries/Directory.Build.props1
-rw-r--r--src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.csproj2
-rw-r--r--src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj10
-rw-r--r--src/libraries/Microsoft.Extensions.Hosting.Systemd/src/Microsoft.Extensions.Hosting.Systemd.csproj4
-rw-r--r--src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Microsoft.Extensions.Logging.Generators.targets2
-rw-r--r--src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.csproj2
-rw-r--r--src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj10
-rw-r--r--src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.csproj2
-rw-r--r--src/libraries/Microsoft.Win32.Primitives/src/Microsoft.Win32.Primitives.csproj2
-rw-r--r--src/libraries/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj6
-rw-r--r--src/libraries/Microsoft.Win32.Registry/ref/Microsoft.Win32.Registry.csproj2
-rw-r--r--src/libraries/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj8
-rw-r--r--src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj5
-rw-r--r--src/libraries/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj2
-rw-r--r--src/libraries/System.AppContext/ref/System.AppContext.csproj2
-rw-r--r--src/libraries/System.AppContext/src/System.AppContext.csproj2
-rw-r--r--src/libraries/System.Buffers/ref/System.Buffers.csproj2
-rw-r--r--src/libraries/System.Buffers/src/System.Buffers.csproj2
-rw-r--r--src/libraries/System.Collections.Concurrent/ref/System.Collections.Concurrent.csproj2
-rw-r--r--src/libraries/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj2
-rw-r--r--src/libraries/System.Collections.NonGeneric/ref/System.Collections.NonGeneric.csproj2
-rw-r--r--src/libraries/System.Collections.NonGeneric/src/System.Collections.NonGeneric.csproj2
-rw-r--r--src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.csproj2
-rw-r--r--src/libraries/System.Collections.Specialized/src/System.Collections.Specialized.csproj2
-rw-r--r--src/libraries/System.Collections/ref/System.Collections.csproj2
-rw-r--r--src/libraries/System.Collections/src/System.Collections.csproj2
-rw-r--r--src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.csproj2
-rw-r--r--src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj2
-rw-r--r--src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj4
-rw-r--r--src/libraries/System.ComponentModel.EventBasedAsync/ref/System.ComponentModel.EventBasedAsync.csproj2
-rw-r--r--src/libraries/System.ComponentModel.EventBasedAsync/src/System.ComponentModel.EventBasedAsync.csproj2
-rw-r--r--src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.csproj2
-rw-r--r--src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj2
-rw-r--r--src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.csproj2
-rw-r--r--src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj2
-rw-r--r--src/libraries/System.ComponentModel/ref/System.ComponentModel.csproj2
-rw-r--r--src/libraries/System.ComponentModel/src/System.ComponentModel.csproj2
-rw-r--r--src/libraries/System.Console/ref/System.Console.csproj2
-rw-r--r--src/libraries/System.Console/src/System.Console.csproj12
-rw-r--r--src/libraries/System.Console/tests/System.Console.Tests.csproj4
-rw-r--r--src/libraries/System.Data.Common/ref/System.Data.Common.csproj2
-rw-r--r--src/libraries/System.Data.Common/src/System.Data.Common.csproj2
-rw-r--r--src/libraries/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj2
-rw-r--r--src/libraries/System.Data.DataSetExtensions/src/System.Data.DataSetExtensions.csproj2
-rw-r--r--src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj11
-rw-r--r--src/libraries/System.Data.Odbc/tests/System.Data.Odbc.Tests.csproj15
-rw-r--r--src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj11
-rw-r--r--src/libraries/System.Diagnostics.Contracts/ref/System.Diagnostics.Contracts.csproj2
-rw-r--r--src/libraries/System.Diagnostics.Contracts/src/System.Diagnostics.Contracts.csproj2
-rw-r--r--src/libraries/System.Diagnostics.Debug/ref/System.Diagnostics.Debug.csproj2
-rw-r--r--src/libraries/System.Diagnostics.Debug/src/System.Diagnostics.Debug.csproj2
-rw-r--r--src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj2
-rw-r--r--src/libraries/System.Diagnostics.EventLog/src/Messages/System.Diagnostics.EventLog.Messages.csproj2
-rw-r--r--src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj7
-rw-r--r--src/libraries/System.Diagnostics.FileVersionInfo/ref/System.Diagnostics.FileVersionInfo.csproj2
-rw-r--r--src/libraries/System.Diagnostics.FileVersionInfo/src/System.Diagnostics.FileVersionInfo.csproj11
-rw-r--r--src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj4
-rw-r--r--src/libraries/System.Diagnostics.PerformanceCounter/src/System.Diagnostics.PerformanceCounter.csproj7
-rw-r--r--src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.csproj2
-rw-r--r--src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj39
-rw-r--r--src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj10
-rw-r--r--src/libraries/System.Diagnostics.StackTrace/ref/System.Diagnostics.StackTrace.csproj2
-rw-r--r--src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj2
-rw-r--r--src/libraries/System.Diagnostics.TextWriterTraceListener/ref/System.Diagnostics.TextWriterTraceListener.csproj2
-rw-r--r--src/libraries/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj2
-rw-r--r--src/libraries/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.csproj2
-rw-r--r--src/libraries/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj2
-rw-r--r--src/libraries/System.Diagnostics.TraceSource/ref/System.Diagnostics.TraceSource.csproj2
-rw-r--r--src/libraries/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj2
-rw-r--r--src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.csproj2
-rw-r--r--src/libraries/System.Diagnostics.Tracing/src/System.Diagnostics.Tracing.csproj2
-rw-r--r--src/libraries/System.Diagnostics.Tracing/tests/System.Diagnostics.Tracing.Tests.csproj2
-rw-r--r--src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj7
-rw-r--r--src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj15
-rw-r--r--src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj7
-rw-r--r--src/libraries/System.DirectoryServices/tests/System.DirectoryServices.Tests.csproj4
-rw-r--r--src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj22
-rw-r--r--src/libraries/System.Drawing.Primitives/ref/System.Drawing.Primitives.csproj2
-rw-r--r--src/libraries/System.Drawing.Primitives/src/System.Drawing.Primitives.csproj8
-rw-r--r--src/libraries/System.Dynamic.Runtime/ref/System.Dynamic.Runtime.csproj2
-rw-r--r--src/libraries/System.Dynamic.Runtime/src/System.Dynamic.Runtime.csproj2
-rw-r--r--src/libraries/System.Globalization.Calendars/ref/System.Globalization.Calendars.csproj2
-rw-r--r--src/libraries/System.Globalization.Calendars/src/System.Globalization.Calendars.csproj2
-rw-r--r--src/libraries/System.Globalization.Extensions/ref/System.Globalization.Extensions.csproj2
-rw-r--r--src/libraries/System.Globalization.Extensions/src/System.Globalization.Extensions.csproj2
-rw-r--r--src/libraries/System.Globalization/ref/System.Globalization.csproj2
-rw-r--r--src/libraries/System.Globalization/src/System.Globalization.csproj2
-rw-r--r--src/libraries/System.IO.Compression.Brotli/ref/System.IO.Compression.Brotli.csproj2
-rw-r--r--src/libraries/System.IO.Compression.Brotli/src/System.IO.Compression.Brotli.csproj9
-rw-r--r--src/libraries/System.IO.Compression.ZipFile/ref/System.IO.Compression.ZipFile.csproj2
-rw-r--r--src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj2
-rw-r--r--src/libraries/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj2
-rw-r--r--src/libraries/System.IO.Compression/ref/System.IO.Compression.csproj2
-rw-r--r--src/libraries/System.IO.Compression/src/System.IO.Compression.csproj4
-rw-r--r--src/libraries/System.IO.FileSystem.AccessControl/ref/System.IO.FileSystem.AccessControl.csproj2
-rw-r--r--src/libraries/System.IO.FileSystem.AccessControl/src/System.IO.FileSystem.AccessControl.csproj19
-rw-r--r--src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.csproj2
-rw-r--r--src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj4
-rw-r--r--src/libraries/System.IO.FileSystem.DriveInfo/tests/System.IO.FileSystem.DriveInfo.Tests.csproj8
-rw-r--r--src/libraries/System.IO.FileSystem.Primitives/ref/System.IO.FileSystem.Primitives.csproj2
-rw-r--r--src/libraries/System.IO.FileSystem.Primitives/src/System.IO.FileSystem.Primitives.csproj2
-rw-r--r--src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.csproj2
-rw-r--r--src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj23
-rw-r--r--src/libraries/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj6
-rw-r--r--src/libraries/System.IO.FileSystem/ref/System.IO.FileSystem.csproj2
-rw-r--r--src/libraries/System.IO.FileSystem/src/System.IO.FileSystem.csproj2
-rw-r--r--src/libraries/System.IO.FileSystem/tests/DisabledFileLockingTests/System.IO.FileSystem.DisabledFileLocking.Tests.csproj2
-rw-r--r--src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj6
-rw-r--r--src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.csproj2
-rw-r--r--src/libraries/System.IO.IsolatedStorage/src/System.IO.IsolatedStorage.csproj24
-rw-r--r--src/libraries/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj4
-rw-r--r--src/libraries/System.IO.MemoryMappedFiles/ref/System.IO.MemoryMappedFiles.csproj2
-rw-r--r--src/libraries/System.IO.MemoryMappedFiles/src/System.IO.MemoryMappedFiles.csproj4
-rw-r--r--src/libraries/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj4
-rw-r--r--src/libraries/System.IO.Pipes.AccessControl/ref/System.IO.Pipes.AccessControl.csproj2
-rw-r--r--src/libraries/System.IO.Pipes.AccessControl/src/System.IO.Pipes.AccessControl.csproj7
-rw-r--r--src/libraries/System.IO.Pipes/ref/System.IO.Pipes.csproj2
-rw-r--r--src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj16
-rw-r--r--src/libraries/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj6
-rw-r--r--src/libraries/System.IO.Ports/src/System.IO.Ports.csproj20
-rw-r--r--src/libraries/System.IO.Ports/tests/System.IO.Ports.Tests.csproj2
-rw-r--r--src/libraries/System.IO.UnmanagedMemoryStream/ref/System.IO.UnmanagedMemoryStream.csproj2
-rw-r--r--src/libraries/System.IO.UnmanagedMemoryStream/src/System.IO.UnmanagedMemoryStream.csproj2
-rw-r--r--src/libraries/System.IO/ref/System.IO.csproj2
-rw-r--r--src/libraries/System.IO/src/System.IO.csproj2
-rw-r--r--src/libraries/System.Linq.Expressions/ref/System.Linq.Expressions.csproj2
-rw-r--r--src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj11
-rw-r--r--src/libraries/System.Linq.Parallel/ref/System.Linq.Parallel.csproj2
-rw-r--r--src/libraries/System.Linq.Parallel/src/System.Linq.Parallel.csproj2
-rw-r--r--src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.csproj2
-rw-r--r--src/libraries/System.Linq.Queryable/src/System.Linq.Queryable.csproj2
-rw-r--r--src/libraries/System.Linq/ref/System.Linq.csproj2
-rw-r--r--src/libraries/System.Linq/src/System.Linq.csproj6
-rw-r--r--src/libraries/System.Management/src/System.Management.csproj5
-rw-r--r--src/libraries/System.Memory/ref/System.Memory.csproj2
-rw-r--r--src/libraries/System.Memory/src/System.Memory.csproj2
-rw-r--r--src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj12
-rw-r--r--src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj2
-rw-r--r--src/libraries/System.Net.Http/ref/System.Net.Http.csproj2
-rw-r--r--src/libraries/System.Net.Http/src/System.Net.Http.csproj83
-rw-r--r--src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj25
-rw-r--r--src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj12
-rw-r--r--src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.csproj2
-rw-r--r--src/libraries/System.Net.HttpListener/src/System.Net.HttpListener.csproj12
-rw-r--r--src/libraries/System.Net.Mail/ref/System.Net.Mail.csproj2
-rw-r--r--src/libraries/System.Net.Mail/src/System.Net.Mail.csproj14
-rw-r--r--src/libraries/System.Net.Mail/tests/Unit/System.Net.Mail.Unit.Tests.csproj8
-rw-r--r--src/libraries/System.Net.NameResolution/ref/System.Net.NameResolution.csproj2
-rw-r--r--src/libraries/System.Net.NameResolution/src/System.Net.NameResolution.csproj8
-rw-r--r--src/libraries/System.Net.NameResolution/tests/PalTests/System.Net.NameResolution.Pal.Tests.csproj8
-rw-r--r--src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.csproj2
-rw-r--r--src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj30
-rw-r--r--src/libraries/System.Net.Ping/ref/System.Net.Ping.csproj2
-rw-r--r--src/libraries/System.Net.Ping/src/System.Net.Ping.csproj18
-rw-r--r--src/libraries/System.Net.Primitives/ref/System.Net.Primitives.csproj2
-rw-r--r--src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj8
-rw-r--r--src/libraries/System.Net.Primitives/tests/PalTests/System.Net.Primitives.Pal.Tests.csproj8
-rw-r--r--src/libraries/System.Net.Primitives/tests/UnitTests/System.Net.Primitives.UnitTests.Tests.csproj4
-rw-r--r--src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj2
-rw-r--r--src/libraries/System.Net.Quic/src/System.Net.Quic.csproj25
-rw-r--r--src/libraries/System.Net.Requests/ref/System.Net.Requests.csproj2
-rw-r--r--src/libraries/System.Net.Requests/src/System.Net.Requests.csproj6
-rw-r--r--src/libraries/System.Net.Security/ref/System.Net.Security.csproj2
-rw-r--r--src/libraries/System.Net.Security/src/System.Net.Security.csproj36
-rw-r--r--src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj8
-rw-r--r--src/libraries/System.Net.Security/tests/UnitTests/System.Net.Security.Unit.Tests.csproj6
-rw-r--r--src/libraries/System.Net.ServicePoint/ref/System.Net.ServicePoint.csproj2
-rw-r--r--src/libraries/System.Net.ServicePoint/src/System.Net.ServicePoint.csproj2
-rw-r--r--src/libraries/System.Net.Sockets/ref/System.Net.Sockets.csproj2
-rw-r--r--src/libraries/System.Net.Sockets/src/System.Net.Sockets.csproj12
-rw-r--r--src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj2
-rw-r--r--src/libraries/System.Net.WebClient/ref/System.Net.WebClient.csproj2
-rw-r--r--src/libraries/System.Net.WebClient/src/System.Net.WebClient.csproj5
-rw-r--r--src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.csproj2
-rw-r--r--src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj2
-rw-r--r--src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.csproj2
-rw-r--r--src/libraries/System.Net.WebProxy/src/System.Net.WebProxy.csproj4
-rw-r--r--src/libraries/System.Net.WebSockets.Client/ref/System.Net.WebSockets.Client.csproj2
-rw-r--r--src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj10
-rw-r--r--src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.csproj2
-rw-r--r--src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj4
-rw-r--r--src/libraries/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj2
-rw-r--r--src/libraries/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj2
-rw-r--r--src/libraries/System.ObjectModel/ref/System.ObjectModel.csproj2
-rw-r--r--src/libraries/System.ObjectModel/src/System.ObjectModel.csproj2
-rw-r--r--src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj2
-rw-r--r--src/libraries/System.Private.Uri/src/System.Private.Uri.csproj4
-rw-r--r--src/libraries/System.Private.Xml.Linq/src/System.Private.Xml.Linq.csproj2
-rw-r--r--src/libraries/System.Private.Xml/src/System.Private.Xml.csproj4
-rw-r--r--src/libraries/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.csproj2
-rw-r--r--src/libraries/System.Reflection.DispatchProxy/src/System.Reflection.DispatchProxy.csproj2
-rw-r--r--src/libraries/System.Reflection.Emit.ILGeneration/ref/System.Reflection.Emit.ILGeneration.csproj2
-rw-r--r--src/libraries/System.Reflection.Emit.ILGeneration/src/System.Reflection.Emit.ILGeneration.csproj2
-rw-r--r--src/libraries/System.Reflection.Emit.Lightweight/ref/System.Reflection.Emit.Lightweight.csproj2
-rw-r--r--src/libraries/System.Reflection.Emit.Lightweight/src/System.Reflection.Emit.Lightweight.csproj2
-rw-r--r--src/libraries/System.Reflection.Emit/ref/System.Reflection.Emit.csproj2
-rw-r--r--src/libraries/System.Reflection.Emit/src/System.Reflection.Emit.csproj2
-rw-r--r--src/libraries/System.Reflection.Extensions/ref/System.Reflection.Extensions.csproj2
-rw-r--r--src/libraries/System.Reflection.Extensions/src/System.Reflection.Extensions.csproj2
-rw-r--r--src/libraries/System.Reflection.Primitives/ref/System.Reflection.Primitives.csproj2
-rw-r--r--src/libraries/System.Reflection.Primitives/src/System.Reflection.Primitives.csproj2
-rw-r--r--src/libraries/System.Reflection.TypeExtensions/ref/System.Reflection.TypeExtensions.csproj2
-rw-r--r--src/libraries/System.Reflection.TypeExtensions/src/System.Reflection.TypeExtensions.csproj2
-rw-r--r--src/libraries/System.Reflection/ref/System.Reflection.csproj2
-rw-r--r--src/libraries/System.Reflection/src/System.Reflection.csproj2
-rw-r--r--src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj2
-rw-r--r--src/libraries/System.Resources.Reader/ref/System.Resources.Reader.csproj2
-rw-r--r--src/libraries/System.Resources.Reader/src/System.Resources.Reader.csproj2
-rw-r--r--src/libraries/System.Resources.ResourceManager/ref/System.Resources.ResourceManager.csproj2
-rw-r--r--src/libraries/System.Resources.ResourceManager/src/System.Resources.ResourceManager.csproj2
-rw-r--r--src/libraries/System.Resources.Writer/ref/System.Resources.Writer.csproj2
-rw-r--r--src/libraries/System.Resources.Writer/src/System.Resources.Writer.csproj2
-rw-r--r--src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj4
-rw-r--r--src/libraries/System.Runtime.CompilerServices.VisualC/ref/System.Runtime.CompilerServices.VisualC.csproj2
-rw-r--r--src/libraries/System.Runtime.CompilerServices.VisualC/src/System.Runtime.CompilerServices.VisualC.csproj2
-rw-r--r--src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj2
-rw-r--r--src/libraries/System.Runtime.Extensions/ref/System.Runtime.Extensions.csproj2
-rw-r--r--src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj2
-rw-r--r--src/libraries/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj8
-rw-r--r--src/libraries/System.Runtime.Handles/ref/System.Runtime.Handles.csproj2
-rw-r--r--src/libraries/System.Runtime.Handles/src/System.Runtime.Handles.csproj2
-rw-r--r--src/libraries/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.csproj2
-rw-r--r--src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj2
-rw-r--r--src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.csproj2
-rw-r--r--src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj2
-rw-r--r--src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj46
-rw-r--r--src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj2
-rw-r--r--src/libraries/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj2
-rw-r--r--src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.csproj2
-rw-r--r--src/libraries/System.Runtime.Loader/src/System.Runtime.Loader.csproj2
-rw-r--r--src/libraries/System.Runtime.Numerics/ref/System.Runtime.Numerics.csproj2
-rw-r--r--src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj2
-rw-r--r--src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.csproj2
-rw-r--r--src/libraries/System.Runtime.Serialization.Formatters/src/System.Runtime.Serialization.Formatters.csproj20
-rw-r--r--src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj4
-rw-r--r--src/libraries/System.Runtime.Serialization.Json/ref/System.Runtime.Serialization.Json.csproj2
-rw-r--r--src/libraries/System.Runtime.Serialization.Json/src/System.Runtime.Serialization.Json.csproj2
-rw-r--r--src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.csproj2
-rw-r--r--src/libraries/System.Runtime.Serialization.Primitives/src/System.Runtime.Serialization.Primitives.csproj2
-rw-r--r--src/libraries/System.Runtime.Serialization.Xml/ref/System.Runtime.Serialization.Xml.csproj2
-rw-r--r--src/libraries/System.Runtime.Serialization.Xml/src/System.Runtime.Serialization.Xml.csproj2
-rw-r--r--src/libraries/System.Runtime/ref/System.Runtime.csproj2
-rw-r--r--src/libraries/System.Runtime/src/System.Runtime.csproj2
-rw-r--r--src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj2
-rw-r--r--src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.csproj2
-rw-r--r--src/libraries/System.Security.AccessControl/src/System.Security.AccessControl.csproj5
-rw-r--r--src/libraries/System.Security.Claims/ref/System.Security.Claims.csproj2
-rw-r--r--src/libraries/System.Security.Claims/src/System.Security.Claims.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Cng/ref/System.Security.Cryptography.Cng.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Cng/src/System.Security.Cryptography.Cng.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Cng/tests/System.Security.Cryptography.Cng.Tests.csproj12
-rw-r--r--src/libraries/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Csp/src/System.Security.Cryptography.Csp.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Encoding/ref/System.Security.Cryptography.Encoding.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.OpenSsl/ref/System.Security.Cryptography.OpenSsl.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj47
-rw-r--r--src/libraries/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Primitives/ref/System.Security.Cryptography.Primitives.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.Primitives/src/System.Security.Cryptography.Primitives.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.ProtectedData/src/System.Security.Cryptography.ProtectedData.csproj7
-rw-r--r--src/libraries/System.Security.Cryptography.X509Certificates/ref/System.Security.Cryptography.X509Certificates.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj16
-rw-r--r--src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.csproj2
-rw-r--r--src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj30
-rw-r--r--src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj8
-rw-r--r--src/libraries/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj2
-rw-r--r--src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.csproj2
-rw-r--r--src/libraries/System.Security.Principal.Windows/src/System.Security.Principal.Windows.csproj11
-rw-r--r--src/libraries/System.Security.Principal/ref/System.Security.Principal.csproj2
-rw-r--r--src/libraries/System.Security.Principal/src/System.Security.Principal.csproj2
-rw-r--r--src/libraries/System.Security.SecureString/ref/System.Security.SecureString.csproj2
-rw-r--r--src/libraries/System.Security.SecureString/src/System.Security.SecureString.csproj2
-rw-r--r--src/libraries/System.ServiceProcess.ServiceController/src/System.ServiceProcess.ServiceController.csproj5
-rw-r--r--src/libraries/System.Speech/src/System.Speech.csproj12
-rw-r--r--src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj4
-rw-r--r--src/libraries/System.Text.Encoding.Extensions/ref/System.Text.Encoding.Extensions.csproj2
-rw-r--r--src/libraries/System.Text.Encoding.Extensions/src/System.Text.Encoding.Extensions.csproj2
-rw-r--r--src/libraries/System.Text.Encoding/ref/System.Text.Encoding.csproj2
-rw-r--r--src/libraries/System.Text.Encoding/src/System.Text.Encoding.csproj2
-rw-r--r--src/libraries/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj3
-rw-r--r--src/libraries/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj2
-rw-r--r--src/libraries/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj2
-rw-r--r--src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.targets2
-rw-r--r--src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj2
-rw-r--r--src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.csproj2
-rw-r--r--src/libraries/System.Text.RegularExpressions/src/System.Text.RegularExpressions.csproj2
-rw-r--r--src/libraries/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj5
-rw-r--r--src/libraries/System.Threading.Overlapped/ref/System.Threading.Overlapped.csproj2
-rw-r--r--src/libraries/System.Threading.Overlapped/src/System.Threading.Overlapped.csproj2
-rw-r--r--src/libraries/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj2
-rw-r--r--src/libraries/System.Threading.Tasks.Extensions/src/System.Threading.Tasks.Extensions.csproj2
-rw-r--r--src/libraries/System.Threading.Tasks.Parallel/ref/System.Threading.Tasks.Parallel.csproj2
-rw-r--r--src/libraries/System.Threading.Tasks.Parallel/src/System.Threading.Tasks.Parallel.csproj2
-rw-r--r--src/libraries/System.Threading.Tasks/ref/System.Threading.Tasks.csproj2
-rw-r--r--src/libraries/System.Threading.Tasks/src/System.Threading.Tasks.csproj2
-rw-r--r--src/libraries/System.Threading.Thread/ref/System.Threading.Thread.csproj2
-rw-r--r--src/libraries/System.Threading.Thread/src/System.Threading.Thread.csproj2
-rw-r--r--src/libraries/System.Threading.ThreadPool/ref/System.Threading.ThreadPool.csproj2
-rw-r--r--src/libraries/System.Threading.ThreadPool/src/System.Threading.ThreadPool.csproj2
-rw-r--r--src/libraries/System.Threading.Timer/ref/System.Threading.Timer.csproj2
-rw-r--r--src/libraries/System.Threading.Timer/src/System.Threading.Timer.csproj2
-rw-r--r--src/libraries/System.Threading/ref/System.Threading.csproj2
-rw-r--r--src/libraries/System.Threading/src/System.Threading.csproj2
-rw-r--r--src/libraries/System.Transactions.Local/ref/System.Transactions.Local.csproj2
-rw-r--r--src/libraries/System.Transactions.Local/src/System.Transactions.Local.csproj2
-rw-r--r--src/libraries/System.ValueTuple/ref/System.ValueTuple.csproj2
-rw-r--r--src/libraries/System.ValueTuple/src/System.ValueTuple.csproj2
-rw-r--r--src/libraries/System.Web.HttpUtility/ref/System.Web.HttpUtility.csproj2
-rw-r--r--src/libraries/System.Web.HttpUtility/src/System.Web.HttpUtility.csproj2
-rw-r--r--src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj9
-rw-r--r--src/libraries/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj2
-rw-r--r--src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.csproj2
-rw-r--r--src/libraries/System.Xml.ReaderWriter/src/System.Xml.ReaderWriter.csproj2
-rw-r--r--src/libraries/System.Xml.XDocument/ref/System.Xml.XDocument.csproj2
-rw-r--r--src/libraries/System.Xml.XDocument/src/System.Xml.XDocument.csproj2
-rw-r--r--src/libraries/System.Xml.XPath.XDocument/ref/System.Xml.XPath.XDocument.csproj2
-rw-r--r--src/libraries/System.Xml.XPath.XDocument/src/System.Xml.XPath.XDocument.csproj2
-rw-r--r--src/libraries/System.Xml.XPath/ref/System.Xml.XPath.csproj2
-rw-r--r--src/libraries/System.Xml.XPath/src/System.Xml.XPath.csproj2
-rw-r--r--src/libraries/System.Xml.XmlDocument/ref/System.Xml.XmlDocument.csproj2
-rw-r--r--src/libraries/System.Xml.XmlDocument/src/System.Xml.XmlDocument.csproj2
-rw-r--r--src/libraries/System.Xml.XmlSerializer/ref/System.Xml.XmlSerializer.csproj2
-rw-r--r--src/libraries/System.Xml.XmlSerializer/src/System.Xml.XmlSerializer.csproj2
-rw-r--r--src/libraries/externals.csproj2
-rw-r--r--src/libraries/native-binplace.proj1
-rw-r--r--src/libraries/pretest.proj2
-rw-r--r--src/libraries/ref.proj7
-rw-r--r--src/libraries/sendtohelix.proj12
-rw-r--r--src/libraries/sendtohelixhelp.proj15
-rw-r--r--src/libraries/shims/generated/Directory.Build.props2
-rw-r--r--src/libraries/shims/manual/Directory.Build.props2
-rw-r--r--src/libraries/src.proj9
349 files changed, 931 insertions, 924 deletions
diff --git a/Directory.Build.props b/Directory.Build.props
index d862ee091fe..b9cc1470bb7 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -305,5 +305,6 @@
<PropertyGroup>
<CustomBeforeNoTargets>$(RepositoryEngineeringDir)NoTargetsSdk.BeforeTargets.targets</CustomBeforeNoTargets>
<CustomAfterTraversalProps>$(RepositoryEngineeringDir)TraversalSdk.AfterProps.props</CustomAfterTraversalProps>
+ <CustomAfterTraversalTargets>$(RepositoryEngineeringDir)TraversalSdk.AfterTargets.targets</CustomAfterTraversalTargets>
</PropertyGroup>
</Project>
diff --git a/docs/coding-guidelines/project-guidelines.md b/docs/coding-guidelines/project-guidelines.md
index 5f27836900e..486a0afd091 100644
--- a/docs/coding-guidelines/project-guidelines.md
+++ b/docs/coding-guidelines/project-guidelines.md
@@ -22,7 +22,7 @@ Below is a list of all the various options we pivot the project builds on:
## Individual build properties
The following are the properties associated with each build pivot
-- `$(BuildTargetFramework) -> Any .NETCoreApp or .NETFramework TFM, e.g. net5.0`
+- `$(BuildTargetFramework) -> Any .NETCoreApp or .NETFramework TFM, e.g. net7.0`
- `$(TargetOS) -> Windows | Linux | OSX | FreeBSD | [defaults to running OS when empty]`
- `$(Configuration) -> Release | [defaults to Debug when empty]`
- `$(TargetArchitecture) - x86 | x64 | arm | arm64 | [defaults to x64 when empty]`
@@ -37,22 +37,18 @@ Each project will define a set of supported TargetFrameworks
<PropertyGroup>
```
-- `$(BuildSettings) -> $(BuildTargetFramework)[-$(TargetOS)][-$(Configuration)][-$(TargetArchitecture)]`
- - Note this property should be file path safe and thus can be used in file names or directories that need to a unique path for a project configuration.
- - The only required Build Settings value is the `$(BuildTargetFramework)` the others are optional.
-
Example:
-Pure netstandard configuration:
+Non cross-targeting project that targets .NETStandard:
```
<PropertyGroup>
- <TargetFrameworks>netstandard2.0</TargetFrameworks>
+ <TargetFramework>netstandard2.0</TargetFramework>
<PropertyGroup>
```
-All supported targets with unique windows/unix build for netcoreapp:
+A cross-targeting project which targets specific platform with `$(NetCoreAppCurrent)` and one .NETFramework tfm:
```
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetFrameworkCurrent)</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetFrameworkMinimum)</TargetFrameworks>
<PropertyGroup>
```
@@ -61,15 +57,15 @@ All supported targets with unique windows/unix build for netcoreapp:
A full or individual project build is centered around BuildTargetFramework, TargetOS, Configuration and TargetArchitecture.
1. `$(BuildTargetFramework), $(TargetOS), $(Configuration), $(TargetArchitecture)` can individually be passed in to change the default values.
-2. If nothing is passed to the build then we will default value of these properties from the environment. Example: `net5.0-[TargetOS Running On]-Debug-x64`.
-3. While Building an individual project from the VS, we build the project for all latest netcoreapp target frameworks.
+2. If nothing is passed to the build then we will default value of these properties from the environment. Example: `net7.0-[TargetOS Running On]-Debug-x64`.
+3. When building an individual project (either from the CLI or an IDE), all target frameworks are built.
We also have `RuntimeOS` which can be passed to customize the specific OS and version needed for native package builds as well as package restoration. If not passed it will default based on the OS you are running on.
-Any of the mentioned properties can be set via `/p:<Property>=<Value>` at the command line. When building using our run tool or any of the wrapper scripts around it (i.e. build.cmd) a number of these properties have aliases which make them easier to pass (run build.cmd/sh -? for the aliases).
+Any of the mentioned properties can be set via `/p:<Property>=<Value>` at the command line. When building using any of the wrapper scripts around it (i.e. build.cmd) a number of these properties have aliases which make them easier to pass (run build.cmd/sh -? for the aliases).
## Selecting the correct BuildSettings
-When building an individual project the `BuildTargetFramework` and `TargetOS` will be used to select the closest matching TargetFramework listed in the projects `TargetFrameworks` property. The rules used to select the targetFramework will consider compatible target frameworks and OS fallbacks.
+When building an individual project the `BuildTargetFramework` and `TargetOS` will be used to select the compatible dependencies which are expressed as ProjectReference items.
## Supported full build settings
- .NET Core latest on current OS (default) -> `$(NetCoreAppCurrent)-[RunningOS]`
@@ -80,37 +76,64 @@ When building an individual project the `BuildTargetFramework` and `TargetOS` wi
## TargetFramework conditions
`TargetFramework` conditions should be avoided in the first PropertyGroup as that causes DesignTimeBuild issues: https://github.com/dotnet/project-system/issues/6143
-1. Use an equality check if the TargetFramework isn't overloaded with the OS portion.
+1. Use TargetFrameworkIdentifier to condition on an entire framework to differentiate between .NETCoreApp, .NETStandard and .NETFramework.
+Example:
+```
+<PropertyGroup>
+ <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
+</PropertyGroup>
+<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">...</ItemGroup>
+<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">...</ItemGroup>
+<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">...</ItemGroup>
+```
+2. Use equality checks if you want to condition on specific runtime agnostic target frameworks (i.e. without the `-windows` suffix).
Example:
```
<PropertyGroup>
- <TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
</PropertyGroup>
+<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">...</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">...</ItemGroup>
+<ItemGroup Condition="'$(TargetFramework)' == '$(NetFrameworkMinimum)'">...</ItemGroup>
```
-2. Use a StartsWith when you want to test for multiple .NETStandard or .NETFramework versions.
+3. Use the `TargetPlatformIdentifier` property to condition on a .NETCoreApp platform specific target framework. Note that .NETStandard and .NETFramework target frameworks can't be platform specific.
Example:
```
<PropertyGroup>
- <TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)</TargetFrameworks>
+</PropertyGroup>
+<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">...</ItemGroup>
+<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX'">...</ItemGroup>
+```
+Important: In contrast to the old `Targets*` checks, `TargetPlatformIdentifier` conditions apply to a single tfm only, inheritance between target frameworks can't be expressed. See the example below for Unix:
+```
+<PropertyGroup>
+ <TargetFrameworks>$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-android;$(NetCoreAppCurrent)-windows</TargetFrameworks>
</PropertyGroup>
-<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))>...</ItemGroup>
+<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'android'">...</ItemGroup>
+<!-- Negations make such conditions easier to write and read. -->
+<ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows'">...</ItemGroup>
```
-3. Use a StartsWith if the TargetFramework is overloaded with the OS portion.
+4. Set the `TargetPlatformIdentifier` property in the project to be able to condition on it in properties in the project file.
+That is necessary as the SDK sets the `TargetPlatformIdentifier` in a .targets file after the project is evaluated. Because of that, the property isn't available during the project's evaluation and must be set manually.
Example:
```
<PropertyGroup>
- <TargetFrameworks>netstandard2.0-windows;netstandard2.0-Unix</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-android</TargetFrameworks>
+</PropertyGroup>
+<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
+<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'android'">$(DefineConstants);ANDROID_USE_BUFFER</DefineConstants>
</PropertyGroup>
-<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard2.0'))>...</ItemGroup>
```
-4. Use negations if that makes the conditions easier.
+5. Use negations if that makes the conditions easier.
Example:
```
<PropertyGroup>
- <TargetFrameworks>netstandard2.0;net462;net472;net5.0</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;net462</TargetFrameworks>
</PropertyGroup>
-<ItemGroup Condition="!$(TargetFramework.StartsWith('net4'))>...</ItemGroup>
+<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">...</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0'">...</ItemGroup>
```
@@ -119,11 +142,10 @@ Example:
Library projects should use the following directory layout.
```
-src\<Library Name>\src - Contains the source code for the library.
+src\<Library Name>\gen - Contains source code for the assembly's source generator.
src\<Library Name>\ref - Contains any reference assembly projects for the library.
-src\<Library Name>\pkg - Contains package projects for the library.
+src\<Library Name>\src - Contains the source code for the library.
src\<Library Name>\tests - Contains the test code for a library.
-src\<Library Name>\gen - Contains source code for the assembly's source generator.
```
## ref
diff --git a/eng/BeforeTargetFrameworkInference.targets b/eng/BeforeTargetFrameworkInference.targets
index 60b41284548..70de3444b58 100644
--- a/eng/BeforeTargetFrameworkInference.targets
+++ b/eng/BeforeTargetFrameworkInference.targets
@@ -1,5 +1,22 @@
<Project>
- <Import Project="$(MSBuildThisDirectory)targetframeworksuffix.props" Condition="'$(DesignTimeBuild)' == 'true'" />
+ <PropertyGroup>
+ <TargetPlatformSupported>true</TargetPlatformSupported>
+ <TargetPlatformVersionSupported>true</TargetPlatformVersionSupported>
+
+ <!-- Value of 0.0 produces versionless SupportedOSPlatform attribute.
+ This is required for platforms not expected to have a version,
+ and we currently omit the version for all platforms. -->
+ <SupportedOSPlatformVersion>0.0</SupportedOSPlatformVersion>
+
+ <!-- Disable setting a default Windows platform for .NETStandard and .NET Framework libraries.
+ This ensures that the TargetPlatformIdentifier property is empty for non .NETCoreApp tfms. -->
+ <_EnableDefaultWindowsPlatform>false</_EnableDefaultWindowsPlatform>
+ <_targetPlatformIdentifier Condition="$(TargetFramework.Contains('-'))">$(TargetFramework.SubString($([MSBuild]::Add($(TargetFramework.IndexOf('-')), 1))))</_targetPlatformIdentifier>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(_targetPlatformIdentifier)' != '' and '$(_targetPlatformIdentifier)' != 'windows'">
+ <TargetPlatformVersion>1.0</TargetPlatformVersion>
+ </PropertyGroup>
</Project>
diff --git a/eng/TraversalSdk.AfterTargets.targets b/eng/TraversalSdk.AfterTargets.targets
new file mode 100644
index 00000000000..f88c48dc867
--- /dev/null
+++ b/eng/TraversalSdk.AfterTargets.targets
@@ -0,0 +1,18 @@
+<Project>
+
+ <!-- Uses the Microsoft.DotNet.Build.Tasks.TargetFramework package to filter out target frameworks from ProjectReferences. -->
+ <PropertyGroup Condition="'$(FilterTraversalProjectReferences)' == 'true'">
+ <BuildDependsOn>$(BuildDependsOn);ResolveP2PReferences</BuildDependsOn>
+ <CleanDependsOn>$(CleanDependsOn);ResolveP2PReferences</CleanDependsOn>
+ <RebuildDependsOn>$(RebuildDependsOn);ResolveP2PReferences</RebuildDependsOn>
+ <TestDependsOn>$(TestDependsOn);ResolveP2PReferences</TestDependsOn>
+ <VSTestDependsOn>$(VSTestDependsOn);ResolveP2PReferences</VSTestDependsOn>
+ <PackDependsOn>$(PackDependsOn);ResolveP2PReferences</PackDependsOn>
+ <PublishDependsOn>$(PublishDependsOn);ResolveP2PReferences</PublishDependsOn>
+ </PropertyGroup>
+
+ <ItemGroup Condition="'$(FilterTraversalProjectReferences)' == 'true'">
+ <ProjectReference Update="@(ProjectReference)" SkipGetTargetFrameworkProperties="false" />
+ </ItemGroup>
+
+</Project> \ No newline at end of file
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index ae6fdbb5972..05a44e0bf9d 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -102,9 +102,9 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>78eaf78761027d225030be2b28aaf4e8bf392929</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework" Version="7.0.0-beta.22110.7">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework" Version="7.0.0-beta.22111.10">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>78eaf78761027d225030be2b28aaf4e8bf392929</Sha>
+ <Sha>ff6cc4e9c3eef575f62a33a642ca80e79d27c9bb</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="7.0.0-beta.22110.7">
<Uri>https://github.com/dotnet/arcade</Uri>
diff --git a/eng/Versions.props b/eng/Versions.props
index e43cb18f09a..3c0663f6dd1 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -67,7 +67,7 @@
<MicrosoftDotNetBuildTasksArchivesVersion>7.0.0-beta.22110.7</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>7.0.0-beta.22110.7</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>7.0.0-beta.22110.7</MicrosoftDotNetBuildTasksPackagingVersion>
- <MicrosoftDotNetBuildTasksTargetFrameworkVersion>7.0.0-beta.22110.7</MicrosoftDotNetBuildTasksTargetFrameworkVersion>
+ <MicrosoftDotNetBuildTasksTargetFrameworkVersion>7.0.0-beta.22111.10</MicrosoftDotNetBuildTasksTargetFrameworkVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>7.0.0-beta.22110.7</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>7.0.0-beta.22110.7</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>7.0.0-beta.22110.7</MicrosoftDotNetRemoteExecutorVersion>
diff --git a/eng/packaging.targets b/eng/packaging.targets
index e705b4e7110..fd2568f5d30 100644
--- a/eng/packaging.targets
+++ b/eng/packaging.targets
@@ -10,9 +10,9 @@
<PackDependsOn>AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(PackDependsOn)</PackDependsOn>
<BeforePack>AddNETStandardCompatErrorFileForPackaging;IncludeAnalyzersInPackage;$(BeforePack)</BeforePack>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddRuntimeSpecificFilesToPackage;IncludeProjectReferencesWithPackAttributeInPackage</TargetsForTfmSpecificContentInPackage>
- <IncludeBuildOutput Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetPlatformIdentifier)' != ''">false</IncludeBuildOutput>
+ <IncludeBuildOutput Condition="'$(TargetPlatformIdentifier)' != ''">false</IncludeBuildOutput>
<!-- Don't include target platform specific dependencies, since we use the target platform to represent RIDs instead -->
- <SuppressDependenciesWhenPacking Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetPlatformIdentifier)' != ''">true</SuppressDependenciesWhenPacking>
+ <SuppressDependenciesWhenPacking Condition="'$(TargetPlatformIdentifier)' != ''">true</SuppressDependenciesWhenPacking>
<PackageDesignerMarkerFile>$(MSBuildThisFileDirectory)useSharedDesignerContext.txt</PackageDesignerMarkerFile>
<!-- Generate packages for rid specific projects or for allconfigurations during build. -->
<!-- A package isn't generated if in servicing or in runtimelab. Intended to be overridden at project level. -->
@@ -101,7 +101,7 @@
DocumentationProjectOutputGroup;
SatelliteDllsProjectOutputGroup;
$(TargetsForTfmSpecificBuildOutput)"
- Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetPlatformIdentifier)' != ''">
+ Condition="'$(TargetPlatformIdentifier)' != ''">
<PropertyGroup>
<RuntimeSymbolPath>$(TargetDir)$(TargetName).pdb</RuntimeSymbolPath>
<_packageTargetRuntime>$(TargetPlatformIdentifier.ToLowerInvariant().Replace('windows', 'win'))</_packageTargetRuntime>
diff --git a/eng/targetframeworksuffix.props b/eng/targetframeworksuffix.props
deleted file mode 100644
index f7074fe3e19..00000000000
--- a/eng/targetframeworksuffix.props
+++ /dev/null
@@ -1,101 +0,0 @@
-<Project>
-
- <PropertyGroup>
- <TargetPlatformSupported>true</TargetPlatformSupported>
- <TargetPlatformVersionSupported>true</TargetPlatformVersionSupported>
-
- <!-- Value of 0.0 produces versionless SupportedOSPlatform attribute.
- This is required for platforms not expected to have a version,
- and we currently omit the version for all platforms. -->
- <SupportedOSPlatformVersion>0.0</SupportedOSPlatformVersion>
- <TargetPlatformIdentifier Condition="$(TargetFramework.Contains('-'))">$(TargetFramework.SubString($([MSBuild]::Add($(TargetFramework.IndexOf('-')), 1))))</TargetPlatformIdentifier>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
- <TargetPlatformVersion>1.0</TargetPlatformVersion>
- </PropertyGroup>
-
- <Choose>
- <When Condition="'$(TargetPlatformIdentifier)' == 'windows'">
- <PropertyGroup>
- <TargetsWindows>true</TargetsWindows>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
- <PropertyGroup>
- <TargetsUnix>true</TargetsUnix>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'Linux'">
- <PropertyGroup>
- <TargetsUnix>true</TargetsUnix>
- <TargetsLinux>true</TargetsLinux>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'Android'">
- <PropertyGroup>
- <TargetsUnix>true</TargetsUnix>
- <TargetsLinux>true</TargetsLinux>
- <TargetsAndroid>true</TargetsAndroid>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'OSX'">
- <PropertyGroup>
- <TargetsUnix>true</TargetsUnix>
- <TargetsOSX>true</TargetsOSX>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'MacCatalyst'">
- <PropertyGroup>
- <TargetsUnix>true</TargetsUnix>
- <TargetsMacCatalyst>true</TargetsMacCatalyst>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'tvOS'">
- <PropertyGroup>
- <TargetsUnix>true</TargetsUnix>
- <TargetstvOS>true</TargetstvOS>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'iOS'">
- <PropertyGroup>
- <TargetsUnix>true</TargetsUnix>
- <TargetsiOS>true</TargetsiOS>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'FreeBSD'">
- <PropertyGroup>
- <TargetsUnix>true</TargetsUnix>
- <TargetsFreeBSD>true</TargetsFreeBSD>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'NetBSD'">
- <PropertyGroup>
- <TargetsUnix>true</TargetsUnix>
- <TargetsNetBSD>true</TargetsNetBSD>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'illumos'">
- <PropertyGroup>
- <TargetsUnix>true</TargetsUnix>
- <Targetsillumos>true</Targetsillumos>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'Solaris'">
- <PropertyGroup>
- <TargetsUnix>true</TargetsUnix>
- <TargetsSolaris>true</TargetsSolaris>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
- <PropertyGroup>
- <TargetsBrowser>true</TargetsBrowser>
- </PropertyGroup>
- </When>
- <When Condition="'$(TargetPlatformIdentifier)' == ''">
- <PropertyGroup>
- <TargetsAnyOS>true</TargetsAnyOS>
- </PropertyGroup>
- </When>
- </Choose>
-</Project>
diff --git a/eng/testing/tests.props b/eng/testing/tests.props
index f23f4cc62e9..e91ec1bbcf0 100644
--- a/eng/testing/tests.props
+++ b/eng/testing/tests.props
@@ -34,8 +34,8 @@
<!-- Provide runtime options to Mono (interpreter, aot, debugging, etc) -->
<ItemGroup Condition="'$(MonoEnvOptions)' != '' and '$(TargetsMobile)' != 'true'">
- <RunScriptCommands Condition="'$(TargetsWindows)' == 'true'" Include="set MONO_ENV_OPTIONS='$(MonoEnvOptions)'" />
- <RunScriptCommands Condition="'$(TargetsWindows)' != 'true'" Include="export MONO_ENV_OPTIONS='$(MonoEnvOptions)'" />
+ <RunScriptCommands Condition="'$(TargetsWindows)' == 'true' or '$(TargetPlatformIdentifier)' == 'windows'" Include="set MONO_ENV_OPTIONS='$(MonoEnvOptions)'" />
+ <RunScriptCommands Condition="'$(TargetsWindows)' != 'true' and '$(TargetPlatformIdentifier)' != 'windows'" Include="export MONO_ENV_OPTIONS='$(MonoEnvOptions)'" />
</ItemGroup>
<ItemGroup Condition="'$(TestRunRequiresLiveRefPack)' == 'true'">
diff --git a/eng/versioning.targets b/eng/versioning.targets
index 4dacec01a86..37e9eba03cd 100644
--- a/eng/versioning.targets
+++ b/eng/versioning.targets
@@ -25,8 +25,8 @@
</AssemblyMetadata>
</ItemGroup>
- <PropertyGroup Condition="'$(TargetsAnyOS)' == 'true' and !$(TargetFrameworks.Contains('$(TargetFramework)-Browser'))">
- <CrossPlatformAndHasNoBrowserTarget>true</CrossPlatformAndHasNoBrowserTarget>
+ <PropertyGroup Condition="'$(TargetPlatformIdentifier)' == '' and !$(TargetFrameworks.Contains('$(TargetFramework)-Browser'))">
+ <CrossPlatformAndHasNoBrowserTarget>true</CrossPlatformAndHasNoBrowserTarget>
</PropertyGroup>
<!-- Enables warnings for Android, iOS, tvOS and macCatalyst for all builds -->
@@ -38,16 +38,18 @@
</ItemGroup>
<!-- Enables browser warnings for cross platform or Browser targeted builds -->
- <ItemGroup Condition="('$(TargetsBrowser)' == 'true' or '$(CrossPlatformAndHasNoBrowserTarget)' == 'true') and '$(IsTestProject)' != 'true'">
+ <ItemGroup Condition="('$(TargetPlatformIdentifier)' == 'Browser' or '$(CrossPlatformAndHasNoBrowserTarget)' == 'true') and '$(IsTestProject)' != 'true'">
<SupportedPlatform Include="browser"/>
</ItemGroup>
<!-- Add target platforms into MSBuild SupportedPlatform list -->
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true' and '$(IsTestProject)' != 'true'">
- <SupportedPlatform Condition="'$(Targetsillumos)' == 'true'" Include="illumos"/>
- <SupportedPlatform Condition="'$(TargetsSolaris)' == 'true'" Include="Solaris"/>
- <SupportedPlatform Condition="'$(TargetstvOS)' == 'true'" Include="tvOS"/>
- <SupportedPlatform Condition="'$(TargetsUnix)' == 'true'" Include="Unix"/>
+ <ItemGroup Condition="'$(IsTestProject)' != 'true'">
+ <SupportedPlatform Condition="'$(TargetPlatformIdentifier)' == 'illumos'" Include="illumos" />
+ <SupportedPlatform Condition="'$(TargetPlatformIdentifier)' == 'Solaris'" Include="Solaris" />
+ <SupportedPlatform Condition="'$(TargetPlatformIdentifier)' == 'tvOS'" Include="tvOS" />
+ <SupportedPlatform Condition="'$(TargetPlatformIdentifier)' != '' and
+ '$(TargetPlatformIdentifier)' != 'Browser' and
+ '$(TargetPlatformIdentifier)' != 'windows'" Include="Unix" />
</ItemGroup>
<!-- Adds UnsupportedOSPlatform and SupportedOSPlatform attributes to the assembly when:
@@ -55,8 +57,10 @@
* This is a cross-platform target
* The build isn't targeting .NET Framework
-->
- <Target Name="AddOSPlatformAttributes" BeforeTargets="GenerateAssemblyInfo" AfterTargets="PrepareForBuild"
- Condition="'$(TargetsAnyOS)' == 'true' and '$(IsTestProject)' != 'true' and '$(TargetFrameworkIdentifier)' != '.NETFramework'">
+ <Target Name="AddOSPlatformAttributes"
+ BeforeTargets="GenerateAssemblyInfo"
+ AfterTargets="PrepareForBuild"
+ Condition="'$(TargetPlatformIdentifier)' == '' and '$(IsTestProject)' != 'true' and '$(TargetFrameworkIdentifier)' != '.NETFramework'">
<!-- Defensively de-dupe the values -->
<ItemGroup>
<_unsupportedOSPlatforms Include="$(UnsupportedOSPlatforms)" />
@@ -85,7 +89,7 @@
</Target>
<!-- Add PlatformNeutralAssembly property for targeted builds of cross platform assemblies -->
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true' and '$(IsTestProject)' != 'true' and '@(SupportedOSPlatforms)' == ''">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(IsTestProject)' != 'true' and '@(SupportedOSPlatforms)' == ''">
<CompilerVisibleProperty Include="PlatformNeutralAssembly" />
</ItemGroup>
diff --git a/src/libraries/Common/tests/Common.Tests.csproj b/src/libraries/Common/tests/Common.Tests.csproj
index 24841a2dedc..0dc2a91ebd8 100644
--- a/src/libraries/Common/tests/Common.Tests.csproj
+++ b/src/libraries/Common/tests/Common.Tests.csproj
@@ -112,7 +112,7 @@
<Compile Include="$(CommonPath)System\Net\MultiArrayBuffer.cs" Link="Common\System\Net\MultiArrayBuffer.cs" />
<Compile Include="$(CommonPath)System\Net\StreamBuffer.cs" Link="Common\System\Net\StreamBuffer.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)'=='true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)System\IO\PathInternal.Windows.cs"
Link="System\IO\PathInternal.Windows.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
@@ -128,7 +128,7 @@
<Compile Include="$(CoreLibSharedDir)System\PasteArguments.Windows.cs"
Link="System\PasteArguments.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="Tests\System\IO\PathInternal.Unix.Tests.cs" />
<Compile Include="$(CommonPath)System\IO\PathInternal.Unix.cs"
Link="System\IO\PathInternal.Unix.cs" />
@@ -140,12 +140,12 @@
Link="System\PasteArguments.Unix.cs" />
</ItemGroup>
<!-- Linux specific files -->
- <ItemGroup Condition="'$(TargetsLinux)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="$(CommonPath)Interop\Linux\Interop.Libraries.cs"
Link="Common\Interop\Linux\Interop.Libraries.cs" />
</ItemGroup>
<!-- OSX specific files -->
- <ItemGroup Condition=" '$(TargetsOSX)' == 'true' ">
+ <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'OSX' ">
<Compile Include="$(CommonPath)Interop\OSX\Interop.Libraries.cs"
Link="Common\Interop\OSX\Interop.Libraries.cs" />
</ItemGroup>
diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props
index 7858515cfc4..961c33028ea 100644
--- a/src/libraries/Directory.Build.props
+++ b/src/libraries/Directory.Build.props
@@ -66,7 +66,6 @@
<Import Project="NetCoreAppLibrary.props" />
<Import Project="$(RepositoryEngineeringDir)referenceAssemblies.props" Condition="'$(IsReferenceAssembly)' == 'true'" />
- <Import Project="$(RepositoryEngineeringDir)targetframeworksuffix.props" Condition="'$(DesignTimeBuild)' != 'true'" />
<PropertyGroup>
<!-- Default any assembly not specifying a key to use the Open Key -->
diff --git a/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.csproj b/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.csproj
index 739cd0edbbe..eede850861a 100644
--- a/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.csproj
+++ b/src/libraries/Microsoft.CSharp/ref/Microsoft.CSharp.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj b/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj
index 8f9de151dfd..b41b3ec1f93 100644
--- a/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj
+++ b/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj
@@ -4,14 +4,16 @@
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);nullable</NoWarn>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <EnableComBinder Condition="'$(TargetsWindows)'=='true'">true</EnableComBinder>
- <DefineConstants Condition="'$(EnableComBinder)'=='true'">$(DefineConstants);ENABLECOMBINDER</DefineConstants>
- <AllowUnsafeBlocks Condition="'$(EnableComBinder)'=='true'">true</AllowUnsafeBlocks>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <EnableComBinder Condition="'$(TargetPlatformIdentifier)' == 'windows'">true</EnableComBinder>
+ <DefineConstants Condition="'$(EnableComBinder)' == 'true'">$(DefineConstants);ENABLECOMBINDER</DefineConstants>
+ <AllowUnsafeBlocks Condition="'$(EnableComBinder)' == 'true'">true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<ILLinkDescriptorsXmls Include="$(ILLinkDirectory)ILLink.Descriptors.Shared.xml" />
- <ILLinkDescriptorsXmls Condition="'$(TargetsWindows)' == 'true'" Include="$(ILLinkDirectory)ILLink.Descriptors.Windows.xml" />
+ <ILLinkDescriptorsXmls Condition="'$(TargetPlatformIdentifier)' == 'windows'" Include="$(ILLinkDirectory)ILLink.Descriptors.Windows.xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Microsoft\CSharp\RuntimeBinder\ArgumentObject.cs" />
diff --git a/src/libraries/Microsoft.Extensions.Hosting.Systemd/src/Microsoft.Extensions.Hosting.Systemd.csproj b/src/libraries/Microsoft.Extensions.Hosting.Systemd/src/Microsoft.Extensions.Hosting.Systemd.csproj
index b9faefd40f2..1e2a601e806 100644
--- a/src/libraries/Microsoft.Extensions.Hosting.Systemd/src/Microsoft.Extensions.Hosting.Systemd.csproj
+++ b/src/libraries/Microsoft.Extensions.Hosting.Systemd/src/Microsoft.Extensions.Hosting.Systemd.csproj
@@ -10,11 +10,11 @@
<IsPackable>true</IsPackable>
</PropertyGroup>
- <ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Remove="SystemdLifetime.netcoreapp.cs" />
</ItemGroup>
- <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<Compile Remove="SystemdLifetime.netstandard.cs" />
</ItemGroup>
diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Microsoft.Extensions.Logging.Generators.targets b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Microsoft.Extensions.Logging.Generators.targets
index 77a182fa464..768d626074b 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Microsoft.Extensions.Logging.Generators.targets
+++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/Microsoft.Extensions.Logging.Generators.targets
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
- <TargetFrameworks>netstandard2.0</TargetFrameworks>
+ <TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>$(MSBuildThisFileName)</AssemblyName>
<RootNamespace>$(MSBuildThisFileName)</RootNamespace>
<StringResourcesClassName>SR</StringResourcesClassName>
diff --git a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.csproj b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.csproj
index 7eba5c85af4..e2aa9431990 100644
--- a/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.csproj
+++ b/src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj
index cdc18e0dd43..060ab1a99b1 100644
--- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj
+++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj
@@ -9,19 +9,21 @@
<OptionCompare>Binary</OptionCompare>
<WarningsNotAsErrors>42025</WarningsNotAsErrors>
<DefineConstants>$(DefineConstants),LATEBINDING=True</DefineConstants>
- <DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants),TARGET_WINDOWS=True</DefineConstants>
<NoWarn>$(NoWarn),CA1052,CA1810,CA2200</NoWarn>
- <NoWarn Condition="'$(TargetsWindows)' != 'true'">$(NoWarn);CA1823</NoWarn>
<!-- Avoid unused fields warnings in Unix build -->
<AssemblyName>Microsoft.VisualBasic.Core</AssemblyName>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<RootNamespace />
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-windows</TargetFrameworks>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <ILLinkDescriptorsXml Condition="'$(TargetsWindows)' == 'true'">$(MSBuildProjectDirectory)\ILLink\ILLink.Descriptors.Windows.xml</ILLinkDescriptorsXml>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <ILLinkDescriptorsXml Condition="'$(TargetPlatformIdentifier)' == 'windows'">$(MSBuildProjectDirectory)\ILLink\ILLink.Descriptors.Windows.xml</ILLinkDescriptorsXml>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'windows'">$(DefineConstants),TARGET_WINDOWS=True</DefineConstants>
+ <NoWarn Condition="'$(TargetPlatformIdentifier)' != 'windows'">$(NoWarn);CA1823</NoWarn>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="Microsoft\VisualBasic\Helpers\NativeMethods.vb" />
<Compile Include="Microsoft\VisualBasic\Helpers\NativeTypes.vb" />
<Compile Include="Microsoft\VisualBasic\Helpers\SafeNativeMethods.vb" />
diff --git a/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.csproj b/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.csproj
index 8a722c2adb5..553bc7bf128 100644
--- a/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.csproj
+++ b/src/libraries/Microsoft.Win32.Primitives/ref/Microsoft.Win32.Primitives.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/Microsoft.Win32.Primitives/src/Microsoft.Win32.Primitives.csproj b/src/libraries/Microsoft.Win32.Primitives/src/Microsoft.Win32.Primitives.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/Microsoft.Win32.Primitives/src/Microsoft.Win32.Primitives.csproj
+++ b/src/libraries/Microsoft.Win32.Primitives/src/Microsoft.Win32.Primitives.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj b/src/libraries/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj
index 506507556b4..a86ab3b729f 100644
--- a/src/libraries/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj
+++ b/src/libraries/Microsoft.Win32.Registry.AccessControl/src/Microsoft.Win32.Registry.AccessControl.csproj
@@ -14,12 +14,12 @@ System.Security.AccessControl.RegistrySecurity</PackageDescription>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETFramework' and
- '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_RegistryAccessControl</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<OmitResources Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</OmitResources>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETFramework' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_RegistryAccessControl</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="Microsoft\Win32\RegistryAclExtensions.cs" />
</ItemGroup>
diff --git a/src/libraries/Microsoft.Win32.Registry/ref/Microsoft.Win32.Registry.csproj b/src/libraries/Microsoft.Win32.Registry/ref/Microsoft.Win32.Registry.csproj
index 8d2c8aaa1e1..95230a12da9 100644
--- a/src/libraries/Microsoft.Win32.Registry/ref/Microsoft.Win32.Registry.csproj
+++ b/src/libraries/Microsoft.Win32.Registry/ref/Microsoft.Win32.Registry.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj b/src/libraries/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj
index d1308100580..82bd8109039 100644
--- a/src/libraries/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj
+++ b/src/libraries/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj
@@ -8,7 +8,9 @@
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <NoWarn Condition="'$(TargetsWindows)' != 'true'">$(NoWarn);CA1823</NoWarn> <!-- Avoid unused fields warnings in Unix build -->
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <!-- Avoid unused fields warnings in Unix build -->
+ <NoWarn Condition="'$(TargetPlatformIdentifier)' != 'windows'">$(NoWarn);CA1823</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
@@ -28,7 +30,7 @@
<Compile Include="System\Security\AccessControl\RegistryRights.cs" />
<Compile Include="System\Security\AccessControl\RegistrySecurity.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Errors.cs"
@@ -68,7 +70,7 @@
Link="Microsoft\Win32\SafeHandles\SafeRegistryHandle.Windows.cs" />
<Compile Include="System\Security\AccessControl\RegistrySecurity.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="Microsoft\Win32\RegistryKey.FileSystem.cs" />
<Compile Include="Microsoft\Win32\SafeHandles\SafeRegistryHandle.FileSystem.cs" />
<Compile Include="System\Security\AccessControl\RegistrySecurity.FileSystem.cs" />
diff --git a/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj b/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj
index 86e6af7fdab..09adc148feb 100644
--- a/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj
+++ b/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj
@@ -12,13 +12,14 @@ Microsoft.Win32.SystemEvents</PackageDescription>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<!-- Constrained Execution Regions only apply to netstandard2.0 and net4* -->
<DefineConstants Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETCoreApp'">$(DefineConstants);FEATURE_CER</DefineConstants>
<IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_SystemEvents</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_SystemEvents</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Errors.cs"
diff --git a/src/libraries/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj b/src/libraries/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj
index 93d874f6188..112de557fbc 100644
--- a/src/libraries/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj
+++ b/src/libraries/Microsoft.XmlSerializer.Generator/src/Microsoft.XmlSerializer.Generator.csproj
@@ -5,7 +5,7 @@
<StringResourcesPath>..\..\System.Private.Xml\src\Resources\Strings.resx</StringResourcesPath>
<StringResourcesName>FxResources.$(AssemblyName.Replace('-', '_')).SR</StringResourcesName>
<OutputType>Exe</OutputType>
- <TargetFrameworks>netstandard2.0</TargetFrameworks>
+ <TargetFramework>netstandard2.0</TargetFramework>
<EnableSingleFileAnalyzer>false</EnableSingleFileAnalyzer>
<IsPackable>true</IsPackable>
<PackageId>$(MSBuildProjectName)</PackageId>
diff --git a/src/libraries/System.AppContext/ref/System.AppContext.csproj b/src/libraries/System.AppContext/ref/System.AppContext.csproj
index 55b863d4d48..0d19d92c18f 100644
--- a/src/libraries/System.AppContext/ref/System.AppContext.csproj
+++ b/src/libraries/System.AppContext/ref/System.AppContext.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.AppContext/src/System.AppContext.csproj b/src/libraries/System.AppContext/src/System.AppContext.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.AppContext/src/System.AppContext.csproj
+++ b/src/libraries/System.AppContext/src/System.AppContext.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Buffers/ref/System.Buffers.csproj b/src/libraries/System.Buffers/ref/System.Buffers.csproj
index 86924bfc712..7d42c1fc58b 100644
--- a/src/libraries/System.Buffers/ref/System.Buffers.csproj
+++ b/src/libraries/System.Buffers/ref/System.Buffers.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Buffers/src/System.Buffers.csproj b/src/libraries/System.Buffers/src/System.Buffers.csproj
index 7e9aff4eedd..fe3825b1c10 100644
--- a/src/libraries/System.Buffers/src/System.Buffers.csproj
+++ b/src/libraries/System.Buffers/src/System.Buffers.csproj
@@ -3,7 +3,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<ExcludeResourcesImport>true</ExcludeResourcesImport>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Collections.Concurrent/ref/System.Collections.Concurrent.csproj b/src/libraries/System.Collections.Concurrent/ref/System.Collections.Concurrent.csproj
index fb225b25b13..c54a6732d98 100644
--- a/src/libraries/System.Collections.Concurrent/ref/System.Collections.Concurrent.csproj
+++ b/src/libraries/System.Collections.Concurrent/ref/System.Collections.Concurrent.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj b/src/libraries/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj
index 0584d13dbe8..00088cbdd4e 100644
--- a/src/libraries/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj
+++ b/src/libraries/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\ThrowHelper.cs" />
diff --git a/src/libraries/System.Collections.NonGeneric/ref/System.Collections.NonGeneric.csproj b/src/libraries/System.Collections.NonGeneric/ref/System.Collections.NonGeneric.csproj
index 84646e61be0..c73a0c807bf 100644
--- a/src/libraries/System.Collections.NonGeneric/ref/System.Collections.NonGeneric.csproj
+++ b/src/libraries/System.Collections.NonGeneric/ref/System.Collections.NonGeneric.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<NoWarn>$(NoWarn);0618</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
diff --git a/src/libraries/System.Collections.NonGeneric/src/System.Collections.NonGeneric.csproj b/src/libraries/System.Collections.NonGeneric/src/System.Collections.NonGeneric.csproj
index 5009669653d..95df0000154 100644
--- a/src/libraries/System.Collections.NonGeneric/src/System.Collections.NonGeneric.csproj
+++ b/src/libraries/System.Collections.NonGeneric/src/System.Collections.NonGeneric.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.csproj b/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.csproj
index c4211d66d7a..43b7e5d06dd 100644
--- a/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.csproj
+++ b/src/libraries/System.Collections.Specialized/ref/System.Collections.Specialized.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Collections.Specialized/src/System.Collections.Specialized.csproj b/src/libraries/System.Collections.Specialized/src/System.Collections.Specialized.csproj
index de6e924bef1..5fef936424d 100644
--- a/src/libraries/System.Collections.Specialized/src/System.Collections.Specialized.csproj
+++ b/src/libraries/System.Collections.Specialized/src/System.Collections.Specialized.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Collections/ref/System.Collections.csproj b/src/libraries/System.Collections/ref/System.Collections.csproj
index 9ab356c8121..92f76098f4e 100644
--- a/src/libraries/System.Collections/ref/System.Collections.csproj
+++ b/src/libraries/System.Collections/ref/System.Collections.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Collections/src/System.Collections.csproj b/src/libraries/System.Collections/src/System.Collections.csproj
index 28dd9816dc2..09c90780f7d 100644
--- a/src/libraries/System.Collections/src/System.Collections.csproj
+++ b/src/libraries/System.Collections/src/System.Collections.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.csproj b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.csproj
index 2267869cc4b..88199b61fc5 100644
--- a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.csproj
+++ b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj b/src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj
index 9c9dfebee9a..7c62a82550e 100644
--- a/src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj
+++ b/src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
<!--
Since many resource strings in this library are shown to an end-user,
diff --git a/src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj b/src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj
index 95b6da0e8e0..dc66b3e88c3 100644
--- a/src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj
+++ b/src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj
@@ -29,7 +29,7 @@ System.ComponentModel.Composition.ReflectionModel.ReflectionModelServices</Packa
<PropertyGroup>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetFramework)' == 'netstandard2.0'">SR.PlatformNotSupported_ComponentModel_Composition</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<Compile Include="TypeForwards.cs" />
<Compile Include="Microsoft\Internal\AttributeServices.cs" />
<Compile Include="Microsoft\Internal\Collections\CollectionServices.cs" />
@@ -200,8 +200,6 @@ System.ComponentModel.Composition.ReflectionModel.ReflectionModelServices</Packa
Link="Common\System\Composition\Diagnostics\DebuggerTraceWriter.cs" />
<Compile Include="$(CommonPath)System\Composition\Diagnostics\TraceWriter.cs"
Link="Common\System\Composition\Diagnostics\TraceWriter.cs" />
- <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\UnconditionalSuppressMessageAttribute.cs"
- Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<Reference Include="Microsoft.Win32.Primitives" />
diff --git a/src/libraries/System.ComponentModel.EventBasedAsync/ref/System.ComponentModel.EventBasedAsync.csproj b/src/libraries/System.ComponentModel.EventBasedAsync/ref/System.ComponentModel.EventBasedAsync.csproj
index 65a1807cd1c..5a91c88354b 100644
--- a/src/libraries/System.ComponentModel.EventBasedAsync/ref/System.ComponentModel.EventBasedAsync.csproj
+++ b/src/libraries/System.ComponentModel.EventBasedAsync/ref/System.ComponentModel.EventBasedAsync.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ComponentModel.EventBasedAsync/src/System.ComponentModel.EventBasedAsync.csproj b/src/libraries/System.ComponentModel.EventBasedAsync/src/System.ComponentModel.EventBasedAsync.csproj
index ad8ffe0f006..8b320923cab 100644
--- a/src/libraries/System.ComponentModel.EventBasedAsync/src/System.ComponentModel.EventBasedAsync.csproj
+++ b/src/libraries/System.ComponentModel.EventBasedAsync/src/System.ComponentModel.EventBasedAsync.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.csproj b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.csproj
index beda8b4a6df..89d0b6dddb7 100644
--- a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.csproj
+++ b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj b/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj
index 55db3244f41..9de98f2f120 100644
--- a/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj
+++ b/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<!--
Since many resource strings in this library are shown to an end-user,
always generate default resource string values which will be used when UseSystemResourceKeys is true in trimmed apps.
diff --git a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.csproj b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.csproj
index 10a6d2f9570..19e92d69408 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.csproj
+++ b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj b/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj
index db7c6d6c275..57e9c3e55cf 100644
--- a/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj
+++ b/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ComponentModel/ref/System.ComponentModel.csproj b/src/libraries/System.ComponentModel/ref/System.ComponentModel.csproj
index 43504ae8c4b..663c10346c4 100644
--- a/src/libraries/System.ComponentModel/ref/System.ComponentModel.csproj
+++ b/src/libraries/System.ComponentModel/ref/System.ComponentModel.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ComponentModel/src/System.ComponentModel.csproj b/src/libraries/System.ComponentModel/src/System.ComponentModel.csproj
index 5b0195df044..a921f083024 100644
--- a/src/libraries/System.ComponentModel/src/System.ComponentModel.csproj
+++ b/src/libraries/System.ComponentModel/src/System.ComponentModel.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Console/ref/System.Console.csproj b/src/libraries/System.Console/ref/System.Console.csproj
index 2394d7a5948..eeae6d27bb0 100644
--- a/src/libraries/System.Console/ref/System.Console.csproj
+++ b/src/libraries/System.Console/ref/System.Console.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Console/src/System.Console.csproj b/src/libraries/System.Console/src/System.Console.csproj
index db9d0fb39fb..d76c64e0cc1 100644
--- a/src/libraries/System.Console/src/System.Console.csproj
+++ b/src/libraries/System.Console/src/System.Console.csproj
@@ -27,7 +27,7 @@
Link="Common\System\Text\ConsoleEncoding.cs" />
</ItemGroup>
<!-- iOS/tvOS -->
- <ItemGroup Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">
<Compile Include="System\ConsolePal.iOS.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.Log.cs"
Link="Common\Interop\Unix\Interop.Log.cs" />
@@ -35,7 +35,7 @@
Link="Common\Interop\Unix\Interop.Libraries.cs" />
</ItemGroup>
<!-- Android -->
- <ItemGroup Condition="'$(TargetsAndroid)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Android'">
<Compile Include="System\ConsolePal.Android.cs" />
<Compile Include="$(CommonPath)Interop\Android\Interop.Logcat.cs">
<Link>Common\Interop\Android\Interop.Logcat.cs</Link>
@@ -45,7 +45,7 @@
</Compile>
</ItemGroup>
<!-- WebAssembly -->
- <ItemGroup Condition="'$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="System\ConsolePal.WebAssembly.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.Dup.cs"
Link="Common\Interop\Unix\Interop.Dup.cs" />
@@ -61,7 +61,7 @@
Link="Common\Interop\Unix\Interop.IOErrors.cs" />
</ItemGroup>
<!-- Windows -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\ConsolePal.Windows.cs" />
<Compile Include="$(CommonPath)System\Text\OSEncoding.Windows.cs"
Link="Common\System\Text\OSEncoding.Windows.cs" />
@@ -155,7 +155,7 @@
Link="Common\System\Text\ValueStringBuilder.cs" />
</ItemGroup>
<!-- Unix -->
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' and '$(TargetsAndroid)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetstvOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="System\ConsolePal.Unix.cs" />
<Compile Include="System\TermInfo.cs" />
<Compile Include="System\IO\StdInReader.cs" />
@@ -232,7 +232,7 @@
<Reference Include="System.Threading" />
<Reference Include="Microsoft.Win32.Primitives" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Runtime.InteropServices.JavaScript\src\System.Private.Runtime.InteropServices.JavaScript.csproj" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.Console/tests/System.Console.Tests.csproj b/src/libraries/System.Console/tests/System.Console.Tests.csproj
index 4418da53021..076efd2213a 100644
--- a/src/libraries/System.Console/tests/System.Console.Tests.csproj
+++ b/src/libraries/System.Console/tests/System.Console.Tests.csproj
@@ -39,10 +39,10 @@
Link="%(RecursiveDir)%(Filename)%(Extension)"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="ConsoleEncoding.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="CancelKeyPress.Unix.cs" />
<Compile Include="NonStandardConfiguration.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
diff --git a/src/libraries/System.Data.Common/ref/System.Data.Common.csproj b/src/libraries/System.Data.Common/ref/System.Data.Common.csproj
index ab75121dec9..b255e6f68e0 100644
--- a/src/libraries/System.Data.Common/ref/System.Data.Common.csproj
+++ b/src/libraries/System.Data.Common/ref/System.Data.Common.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);0618</NoWarn>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Data.Common/src/System.Data.Common.csproj b/src/libraries/System.Data.Common/src/System.Data.Common.csproj
index b836c7f2c8e..a9ad614630f 100644
--- a/src/libraries/System.Data.Common/src/System.Data.Common.csproj
+++ b/src/libraries/System.Data.Common/src/System.Data.Common.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj b/src/libraries/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj
index cedcb0aac65..ae3518dee7c 100644
--- a/src/libraries/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj
+++ b/src/libraries/System.Data.DataSetExtensions/ref/System.Data.DataSetExtensions.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Data.DataSetExtensions/src/System.Data.DataSetExtensions.csproj b/src/libraries/System.Data.DataSetExtensions/src/System.Data.DataSetExtensions.csproj
index e5ff6a463dd..bcb4ad6f1fb 100644
--- a/src/libraries/System.Data.DataSetExtensions/src/System.Data.DataSetExtensions.csproj
+++ b/src/libraries/System.Data.DataSetExtensions/src/System.Data.DataSetExtensions.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<Nullable>enable</Nullable>
</PropertyGroup>
diff --git a/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj b/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj
index d0818649229..de391f5ebf3 100644
--- a/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj
+++ b/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj
@@ -20,15 +20,16 @@ System.Data.Odbc.OdbcTransaction</PackageDescription>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
<!-- https://github.com/dotnet/arcade/issues/5717 -->
<NoWarn Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETCoreApp'">$(NoWarn);SA1121</NoWarn>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true' and '$(IsPartialFacadeAssembly)' != 'true'">SR.Odbc_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' == ''">SR.Odbc_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" >
<Compile Include="System\Data\Odbc\ODBC32.Common.cs"/>
</ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="$(CommonPath)System\Data\Common\AdapterUtil.cs"
Link="Common\System\Data\Common\AdapterUtil.cs" />
<Compile Include="$(CommonPath)System\Data\Common\AdapterUtil.Drivers.cs"
@@ -132,15 +133,15 @@ System.Data.Odbc.OdbcTransaction</PackageDescription>
<Compile Include="$(CommonPath)System\Runtime\InteropServices\HandleRefMarshaller.cs"
Link="Common\System\Runtime\InteropServices\HandleRefMarshaller.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsLinux)' == 'true' or '$(TargetsFreeBSD)' == 'true' or '$(Targetsillumos)' == 'true' or '$(TargetsSolaris)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'FreeBSD' or '$(TargetPlatformIdentifier)' == 'illumos' or '$(TargetPlatformIdentifier)' == 'Solaris'">
<Compile Include="$(CommonPath)Interop\Linux\Interop.Libraries.cs"
Link="Common\Interop\Linux\Interop.Libraries.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">
<Compile Include="$(CommonPath)Interop\OSX\Interop.Libraries.cs"
Link="Common\Interop\OSX\Interop.Libraries.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
</ItemGroup>
diff --git a/src/libraries/System.Data.Odbc/tests/System.Data.Odbc.Tests.csproj b/src/libraries/System.Data.Odbc/tests/System.Data.Odbc.Tests.csproj
index 3ca325a2f88..85a15ebe3d2 100644
--- a/src/libraries/System.Data.Odbc/tests/System.Data.Odbc.Tests.csproj
+++ b/src/libraries/System.Data.Odbc/tests/System.Data.Odbc.Tests.csproj
@@ -4,7 +4,8 @@
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <DefineConstants Condition="'$(TargetsWindows)' == 'true' or $([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">$(DefineConstants);TargetsWindows</DefineConstants>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'windows' or $([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">$(DefineConstants);TargetsWindows</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="DependencyCheckTest.cs" />
@@ -18,28 +19,28 @@
<Compile Include="TestCommon\CheckConnStrSetupFactAttribute.cs" />
<Compile Include="OdbcParameterTests.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows' and '$(TargetFrameworkIdentifier)' != '.NETFramework'">
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsLinux)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux'">
<Compile Include="$(CommonPath)Interop\Linux\Interop.Libraries.cs"
Link="Common\Interop\Linux\Interop.Libraries.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">
<Compile Include="$(CommonPath)Interop\OSX\Interop.Libraries.cs"
Link="Common\Interop\OSX\Interop.Libraries.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsFreeBSD)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'FreeBSD'">
<Compile Include="$(CommonPath)Interop\FreeBSD\Interop.Libraries.cs"
Link="Common\Interop\FreeBSD\Interop.Libraries.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' or '$(TargetFrameworkIdentifier)' == '.NETFramework'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows' or '$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="ConnectionStrings.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' != 'true' and '$(TargetFrameworkIdentifier)' != '.NETFramework'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows' and '$(TargetFrameworkIdentifier)' != '.NETFramework'">
<Compile Include="ConnectionStrings.Unix.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
diff --git a/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj b/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj
index ff915761659..1f83a1ca294 100644
--- a/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj
+++ b/src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj
@@ -26,12 +26,13 @@ System.Data.OleDb.OleDbTransaction</PackageDescription>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_OleDb</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_OleDb</GeneratePlatformNotSupportedAssemblyMessage>
<NoWarn Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' != ''">$(NoWarn);CS0618</NoWarn>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.GetUserDefaultLCID.cs"
@@ -129,13 +130,11 @@ System.Data.OleDb.OleDbTransaction</PackageDescription>
<Compile Include="System\Data\ProviderBase\DbReferenceCollection.cs" />
<Compile Include="System\Data\ProviderBase\WrappedIUnknown.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
+
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="UnsafeNativeMethods.COMWrappers.cs" />
<Compile Include="OleDbComWrappers.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' == 'true' and !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0'))">
- <Compile Include="UnsafeNativeMethods.NoCOMWrappers.cs" />
- </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\System.Data.OleDb.OleDbMetaData.xml"
diff --git a/src/libraries/System.Diagnostics.Contracts/ref/System.Diagnostics.Contracts.csproj b/src/libraries/System.Diagnostics.Contracts/ref/System.Diagnostics.Contracts.csproj
index 193726ce1e0..66fd17f7438 100644
--- a/src/libraries/System.Diagnostics.Contracts/ref/System.Diagnostics.Contracts.csproj
+++ b/src/libraries/System.Diagnostics.Contracts/ref/System.Diagnostics.Contracts.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.Contracts/src/System.Diagnostics.Contracts.csproj b/src/libraries/System.Diagnostics.Contracts/src/System.Diagnostics.Contracts.csproj
index dd3dc2940a5..5ecfe239de6 100644
--- a/src/libraries/System.Diagnostics.Contracts/src/System.Diagnostics.Contracts.csproj
+++ b/src/libraries/System.Diagnostics.Contracts/src/System.Diagnostics.Contracts.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.Debug/ref/System.Diagnostics.Debug.csproj b/src/libraries/System.Diagnostics.Debug/ref/System.Diagnostics.Debug.csproj
index 1d1a2b817e9..7ae0399d1ab 100644
--- a/src/libraries/System.Diagnostics.Debug/ref/System.Diagnostics.Debug.csproj
+++ b/src/libraries/System.Diagnostics.Debug/ref/System.Diagnostics.Debug.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.Debug/src/System.Diagnostics.Debug.csproj b/src/libraries/System.Diagnostics.Debug/src/System.Diagnostics.Debug.csproj
index dd3dc2940a5..5ecfe239de6 100644
--- a/src/libraries/System.Diagnostics.Debug/src/System.Diagnostics.Debug.csproj
+++ b/src/libraries/System.Diagnostics.Debug/src/System.Diagnostics.Debug.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj
index a9191d5aa82..e57e7a1ccec 100644
--- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj
+++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj
@@ -6,7 +6,7 @@
<PropertyGroup>
<DefineConstants Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETCoreApp'">$(DefineConstants);MEMORYMARSHAL_SUPPORT</DefineConstants>
</PropertyGroup>
- <ItemGroup Condition="!$(TargetFramework.StartsWith('net4'))">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<Compile Include="DiagnosticSourceEventSourceBridgeTests.cs" />
</ItemGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.EventLog/src/Messages/System.Diagnostics.EventLog.Messages.csproj b/src/libraries/System.Diagnostics.EventLog/src/Messages/System.Diagnostics.EventLog.Messages.csproj
index d2ad06b758f..56a71b1d27b 100644
--- a/src/libraries/System.Diagnostics.EventLog/src/Messages/System.Diagnostics.EventLog.Messages.csproj
+++ b/src/libraries/System.Diagnostics.EventLog/src/Messages/System.Diagnostics.EventLog.Messages.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>netstandard2.0</TargetFrameworks>
+ <TargetFramework>netstandard2.0</TargetFramework>
<Win32Resource>EventLogMessages.res</Win32Resource>
<!-- Override the parent Directory.Build.props -->
<SupportedOSPlatforms />
diff --git a/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj b/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj
index fd558833ee2..a97fd6227e0 100644
--- a/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj
+++ b/src/libraries/System.Diagnostics.EventLog/src/System.Diagnostics.EventLog.csproj
@@ -17,11 +17,12 @@ System.Diagnostics.EventLog</PackageDescription>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_EventLog</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_EventLog</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Diagnostics\EntryWrittenEventArgs.cs" />
<Compile Include="System\Diagnostics\EntryWrittenEventHandler.cs" />
<Compile Include="System\Diagnostics\EventData.cs" />
@@ -151,7 +152,7 @@ System.Diagnostics.EventLog</PackageDescription>
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<ProjectReference Include="Messages\System.Diagnostics.EventLog.Messages.csproj"
ReferenceOutputAssembly="false"
OutputItemType="TfmRuntimeSpecificPackageFile"
diff --git a/src/libraries/System.Diagnostics.FileVersionInfo/ref/System.Diagnostics.FileVersionInfo.csproj b/src/libraries/System.Diagnostics.FileVersionInfo/ref/System.Diagnostics.FileVersionInfo.csproj
index 85460a8410d..eb11026ebbb 100644
--- a/src/libraries/System.Diagnostics.FileVersionInfo/ref/System.Diagnostics.FileVersionInfo.csproj
+++ b/src/libraries/System.Diagnostics.FileVersionInfo/ref/System.Diagnostics.FileVersionInfo.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.FileVersionInfo/src/System.Diagnostics.FileVersionInfo.csproj b/src/libraries/System.Diagnostics.FileVersionInfo/src/System.Diagnostics.FileVersionInfo.csproj
index fae2dee2392..3bc748311c5 100644
--- a/src/libraries/System.Diagnostics.FileVersionInfo/src/System.Diagnostics.FileVersionInfo.csproj
+++ b/src/libraries/System.Diagnostics.FileVersionInfo/src/System.Diagnostics.FileVersionInfo.csproj
@@ -6,14 +6,15 @@
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.DiagnosticsFileVersionInfo_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.DiagnosticsFileVersionInfo_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\Diagnostics\FileVersionInfo.cs" />
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Diagnostics\FileVersionInfo.Windows.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
@@ -32,7 +33,7 @@
<Compile Include="$(CommonPath)Interop\Windows\Version\Interop.VSFixedFileInfo.cs"
Link="Common\Interop\Windows\Interop.VSFixedFileInfo.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="System\Diagnostics\FileVersionInfo.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
@@ -49,7 +50,7 @@
<Reference Include="System.Runtime.Extensions" />
<Reference Include="System.Runtime.InteropServices" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Reference Include="System.Collections.Immutable" />
<Reference Include="System.Reflection.Metadata" />
</ItemGroup>
diff --git a/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj b/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj
index 9b99ef0ab81..36f5ea370f9 100644
--- a/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj
+++ b/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj
@@ -29,14 +29,14 @@
<Compile Include="FileVersionInfoTest.cs" />
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="FileVersionInfoTest.Windows.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="ProductionCode\Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.VerLanguageName.cs"
Link="ProductionCode\Common\Interop\Windows\Kernel32\Interop.VerLanguageName.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="FileVersionInfoTest.Unix.cs" />
</ItemGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/System.Diagnostics.PerformanceCounter.csproj b/src/libraries/System.Diagnostics.PerformanceCounter/src/System.Diagnostics.PerformanceCounter.csproj
index f90314643f4..ff0ebc6c358 100644
--- a/src/libraries/System.Diagnostics.PerformanceCounter/src/System.Diagnostics.PerformanceCounter.csproj
+++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/System.Diagnostics.PerformanceCounter.csproj
@@ -3,7 +3,6 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
<NoWarn>$(NoWarn);CA1847</NoWarn>
- <NoWarn Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">$(NoWarn);CA1066</NoWarn>
<Nullable>annotations</Nullable>
<IsPackable>true</IsPackable>
<PackageDescription>Provides the System.Diagnostics.PerformanceCounter class, which allows access to Windows performance counters.
@@ -13,10 +12,12 @@ System.Diagnostics.PerformanceCounter</PackageDescription>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <NoWarn Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETCoreApp'">$(NoWarn);CA1066</NoWarn>
<IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_PerfCounters</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_PerfCounters</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Diagnostics\DiagnosticsConfiguration.cs" />
<Compile Include="System\Diagnostics\CounterCreationData.cs" />
<Compile Include="System\Diagnostics\CounterCreationDataCollection.cs" />
diff --git a/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.csproj b/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.csproj
index e30075373d5..2f392d43da1 100644
--- a/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.csproj
+++ b/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj b/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj
index 8a41187ffa5..c91e7c693aa 100644
--- a/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj
+++ b/src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj
@@ -2,17 +2,16 @@
<PropertyGroup>
<DefineConstants>$(DefineConstants);FEATURE_REGISTRY</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent);$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-MacCatalyst;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-MacCatalyst;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
- <!-- Suppress unused field warnings when using PlatformNotSupportedException stubs -->
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.Process_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.Process_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <IsiOSLike Condition="'$(TargetPlatformIdentifier)' == 'MacCatalyst' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">true</IsiOSLike>
</PropertyGroup>
- <PropertyGroup>
- <IsiOSLike Condition="'$(TargetsMacCatalyst)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">true</IsiOSLike>
- </PropertyGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="Microsoft\Win32\SafeHandles\SafeProcessHandle.cs" />
<Compile Include="System\Collections\Specialized\DictionaryWrapper.cs" />
<Compile Include="System\Diagnostics\AsyncStreamReader.cs" />
@@ -44,7 +43,7 @@
<Compile Include="$(CommonPath)System\Text\ValueStringBuilder.cs"
Link="Common\System\Text\ValueStringBuilder.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.EnumProcessModules.cs"
Link="Common\Interop\Windows\Kernel32\Interop.EnumProcessModules.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.FormatMessage.cs"
@@ -77,8 +76,6 @@
Link="Common\Interop\Windows\User32\Interop.SendMessageTimeout.cs" />
<Compile Include="$(CommonPath)Interop\Windows\User32\Interop.WaitForInputIdle.cs"
Link="Common\Interop\Windows\User32\Interop.WaitForInputIdle.cs" />
- </ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeTokenHandle.cs"
Link="Microsoft\Win32\SafeHandles\SafeTokenHandle.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
@@ -148,7 +145,7 @@
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.SetPriorityClass.cs"
Link="Common\Interop\Windows\Kernel32\Interop.SetPriorityClass.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.DuplicateHandle_SafeFileHandle.cs"
- Link="Common\Interop\Windows\kernel32\Interop.DuplicateHandle_SafeFileHandle.cs" />
+ Link="Common\Interop\Windows\kernel32\Interop.DuplicateHandle_SafeFileHandle.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.DuplicateHandle_SafeWaitHandle.cs"
Link="Common\Interop\Windows\kernel32\Interop.DuplicateHandle_SafeWaitHandle.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.ProcessWaitHandle.cs"
@@ -222,7 +219,7 @@
<Compile Include="System\Diagnostics\ProcessThread.Windows.cs" />
<Compile Include="System\Diagnostics\ProcessThreadTimes.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs" />
<Compile Include="System\Diagnostics\Process.Unix.cs" />
<Compile Include="System\Diagnostics\ProcessManager.Unix.cs" />
@@ -285,15 +282,15 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.IsMemberOfGroup.cs"
Link="Common\Interop\Unix\Interop.IsMemberOfGroup.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true' and '$(IsiOSLike)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(IsiOSLike)' != 'true'">
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.ConfigureTerminalForChildProcess.cs"
Link="Common\Interop\Unix\Interop.ConfigureTerminalForChildProcess.cs" />
<Compile Include="System\Diagnostics\Process.ConfigureTerminalForChildProcesses.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true' and '$(IsiOSLike)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(IsiOSLike)' == 'true'">
<Compile Include="System\Diagnostics\Process.ConfigureTerminalForChildProcesses.iOS.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsLinux)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux'">
<Compile Include="System\Diagnostics\Process.Linux.cs" />
<Compile Include="System\Diagnostics\ProcessManager.Linux.cs" />
<Compile Include="System\Diagnostics\ProcessThread.Linux.cs" />
@@ -308,7 +305,7 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.SchedGetSetAffinity.cs"
Link="Common\Interop\Linux\Interop.SchedGetSetAffinity.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsOSX)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'MacCatalyst'">
<Compile Include="System\Diagnostics\Process.BSD.cs" />
<Compile Include="System\Diagnostics\Process.OSX.cs" />
<Compile Include="System\Diagnostics\ProcessManager.BSD.cs" />
@@ -321,17 +318,17 @@
<Compile Include="$(CommonPath)Interop\OSX\Interop.Libraries.cs"
Link="Common\Interop\OSX\Interop.Libraries.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Shell32\Interop.ShellExecuteExW.cs"
Link="Common\Interop\Windows\Shell32\Interop.ShellExecuteExW.cs" />
<Compile Include="System\Diagnostics\Process.Win32.cs" />
<Compile Include="System\Diagnostics\ProcessManager.Win32.cs" />
<Compile Include="System\Diagnostics\ProcessStartInfo.Win32.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetstvOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'iOS' and '$(TargetPlatformIdentifier)' != 'tvOS'">
<Compile Include="System\Diagnostics\Process.NonUap.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsFreeBSD)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'FreeBSD'">
<Compile Include="System\Diagnostics\Process.BSD.cs" />
<Compile Include="System\Diagnostics\Process.FreeBSD.cs" />
<Compile Include="System\Diagnostics\ProcessManager.BSD.cs" />
@@ -344,12 +341,12 @@
<Compile Include="$(CommonPath)Interop\FreeBSD\Interop.Process.GetProcInfo.cs"
Link="Common\Interop\FreeBSD\Interop.Process.GetProcInfo.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">
<Compile Include="System\Diagnostics\Process.iOS.cs" />
<Compile Include="System\Diagnostics\ProcessManager.iOS.cs" />
<Compile Include="System\Diagnostics\ProcessThread.iOS.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnknownUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'UnknownUnix'">
<Compile Include="System\Diagnostics\Process.UnknownUnix.cs" />
<Compile Include="System\Diagnostics\ProcessManager.UnknownUnix.cs" />
<Compile Include="System\Diagnostics\ProcessThread.UnknownUnix.cs" />
diff --git a/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj b/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj
index 783e4ad21e9..089d4fdeb4d 100644
--- a/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj
+++ b/src/libraries/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj
@@ -1,12 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants);TargetsWindows</DefineConstants>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser</TargetFrameworks>
<IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI>
<EnableDllImportGenerator>true</EnableDllImportGenerator>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
+ <PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'windows'">$(DefineConstants);TargetsWindows</DefineConstants>
+ </PropertyGroup>
<ItemGroup>
<Compile Include="$(CoreLibSharedDir)System\PasteArguments.cs"
Link="System\PasteArguments.cs" />
@@ -37,7 +41,7 @@
<Compile Include="RemotelyInvokable.cs" />
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="ProcessModuleTests.Windows.cs" />
<Compile Include="ProcessTests.Windows.cs" />
<Compile Include="ProcessThreadTests.Windows.cs" />
@@ -50,7 +54,7 @@
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.FreeLibrary.cs"
Link="Common\Interop\Windows\Kernel32\Interop.FreeLibrary.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="Interop.Unix.cs" />
<Compile Include="ProcessTests.Unix.cs" />
<Compile Include="ProcessThreadTests.Unix.cs" />
diff --git a/src/libraries/System.Diagnostics.StackTrace/ref/System.Diagnostics.StackTrace.csproj b/src/libraries/System.Diagnostics.StackTrace/ref/System.Diagnostics.StackTrace.csproj
index 35e82eee5e7..ed8643bdf44 100644
--- a/src/libraries/System.Diagnostics.StackTrace/ref/System.Diagnostics.StackTrace.csproj
+++ b/src/libraries/System.Diagnostics.StackTrace/ref/System.Diagnostics.StackTrace.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj b/src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj
index 8cecf8e2327..7962381d9d7 100644
--- a/src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj
+++ b/src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj
@@ -3,7 +3,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Diagnostics\StackTraceSymbols.cs" />
diff --git a/src/libraries/System.Diagnostics.TextWriterTraceListener/ref/System.Diagnostics.TextWriterTraceListener.csproj b/src/libraries/System.Diagnostics.TextWriterTraceListener/ref/System.Diagnostics.TextWriterTraceListener.csproj
index d83d56c13eb..7238adfa345 100644
--- a/src/libraries/System.Diagnostics.TextWriterTraceListener/ref/System.Diagnostics.TextWriterTraceListener.csproj
+++ b/src/libraries/System.Diagnostics.TextWriterTraceListener/ref/System.Diagnostics.TextWriterTraceListener.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj b/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj
index d179081ce20..cf755b59130 100644
--- a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj
+++ b/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System.Diagnostics.TextWriterTraceListener.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.csproj b/src/libraries/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.csproj
index d1f6b1fa858..81fa1ed3e68 100644
--- a/src/libraries/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.csproj
+++ b/src/libraries/System.Diagnostics.Tools/ref/System.Diagnostics.Tools.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj b/src/libraries/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj
+++ b/src/libraries/System.Diagnostics.Tools/src/System.Diagnostics.Tools.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.TraceSource/ref/System.Diagnostics.TraceSource.csproj b/src/libraries/System.Diagnostics.TraceSource/ref/System.Diagnostics.TraceSource.csproj
index a344553052c..093d289611f 100644
--- a/src/libraries/System.Diagnostics.TraceSource/ref/System.Diagnostics.TraceSource.csproj
+++ b/src/libraries/System.Diagnostics.TraceSource/ref/System.Diagnostics.TraceSource.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj b/src/libraries/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj
index 7b62f85f073..2910efd2719 100644
--- a/src/libraries/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj
+++ b/src/libraries/System.Diagnostics.TraceSource/src/System.Diagnostics.TraceSource.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.csproj b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.csproj
index 4a57f065745..b59d58aabfd 100644
--- a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.csproj
+++ b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.Tracing/src/System.Diagnostics.Tracing.csproj b/src/libraries/System.Diagnostics.Tracing/src/System.Diagnostics.Tracing.csproj
index dd3dc2940a5..5ecfe239de6 100644
--- a/src/libraries/System.Diagnostics.Tracing/src/System.Diagnostics.Tracing.csproj
+++ b/src/libraries/System.Diagnostics.Tracing/src/System.Diagnostics.Tracing.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Diagnostics.Tracing/tests/System.Diagnostics.Tracing.Tests.csproj b/src/libraries/System.Diagnostics.Tracing/tests/System.Diagnostics.Tracing.Tests.csproj
index 66eb092dee1..c8f85a372ea 100644
--- a/src/libraries/System.Diagnostics.Tracing/tests/System.Diagnostics.Tracing.Tests.csproj
+++ b/src/libraries/System.Diagnostics.Tracing/tests/System.Diagnostics.Tracing.Tests.csproj
@@ -6,7 +6,7 @@
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
</PropertyGroup>
<!-- Windows only files -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="BasicEventSourceTest\Harness\EtwListener.cs" />
<Compile Include="BasicEventSourceTest\TestEventCounter.Etw.cs" />
<Compile Include="BasicEventSourceTest\TestsWrite.Etw.cs" />
diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj b/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj
index b518e6ecd1f..8c92ed4fc9e 100644
--- a/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj
+++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj
@@ -16,9 +16,10 @@
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.DirectoryServicesAccountManagement_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'windows'">SR.DirectoryServicesAccountManagement_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\DirectoryServices\AccountManagement\interopt.cs" />
<Compile Include="System\DirectoryServices\AccountManagement\PrincipalSearcher.cs" />
<Compile Include="System\DirectoryServices\AccountManagement\Utils.cs" />
@@ -224,7 +225,7 @@
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
<Reference Include="System.Security.Cryptography" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
index 366ab1b3185..43c120b0a74 100644
--- a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
+++ b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
@@ -13,9 +13,10 @@
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.DirectoryServicesProtocols_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.DirectoryServicesProtocols_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\DirectoryServices\Protocols\common\AuthTypes.cs" />
<Compile Include="System\DirectoryServices\Protocols\common\BerConverter.cs" />
<Compile Include="System\DirectoryServices\Protocols\common\DereferenceAlias.cs" />
@@ -52,7 +53,7 @@
<Link>Common\Interop\Windows\Interop.BOOL.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\DirectoryServices\Protocols\common\BerConverter.Windows.cs" />
<Compile Include="System\DirectoryServices\Protocols\common\QuotaControl.Windows.cs" />
<Compile Include="System\DirectoryServices\Protocols\Interop\LdapPal.Windows.cs" />
@@ -70,7 +71,7 @@
<Link>Common\Interop\Windows\Wldap32\Interop.Ber.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'OSX'">
<Compile Include="System\DirectoryServices\Protocols\common\BerConverter.Linux.cs" />
<Compile Include="System\DirectoryServices\Protocols\common\QuotaControl.Linux.cs" />
<Compile Include="System\DirectoryServices\Protocols\Interop\LdapPal.Linux.cs" />
@@ -89,12 +90,12 @@
<Link>Common\Interop\Linux\OpenLdap\Interop.Ber.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsLinux)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux'">
<Compile Include="$(CommonPath)Interop\Linux\Interop.Libraries.cs">
<Link>Common\Interop\Linux\Interop.Libraries.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsOSX)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX'">
<Compile Include="$(CommonPath)Interop\OSX\Interop.Libraries.cs">
<Link>Common\Interop\OSX\Interop.Libraries.cs</Link>
</Compile>
@@ -124,7 +125,7 @@
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
<Reference Include="System.Security.Cryptography" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
index 9f4bbc7733b..409bae7e786 100644
--- a/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
+++ b/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj
@@ -25,9 +25,10 @@ System.DirectoryServices.ActiveDirectory.DomainController</PackageDescription>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.DirectoryServices_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'windows'">SR.DirectoryServices_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\DirectoryServices\ActiveDirectorySecurity.cs" />
<Compile Include="System\DirectoryServices\AdsVLV.cs" />
<Compile Include="System\DirectoryServices\AuthenticationTypes.cs" />
@@ -273,7 +274,7 @@ System.DirectoryServices.ActiveDirectory.DomainController</PackageDescription>
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
<Reference Include="System.Security.Cryptography" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="$(SystemIOFileSystemAccessControlVersion)" />
<PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
diff --git a/src/libraries/System.DirectoryServices/tests/System.DirectoryServices.Tests.csproj b/src/libraries/System.DirectoryServices/tests/System.DirectoryServices.Tests.csproj
index 7c86e128ac5..51fee5865b7 100644
--- a/src/libraries/System.DirectoryServices/tests/System.DirectoryServices.Tests.csproj
+++ b/src/libraries/System.DirectoryServices/tests/System.DirectoryServices.Tests.csproj
@@ -27,11 +27,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<Compile Include="System\DirectoryServices\DirectoryServicesTests.Windows.cs" />
<Compile Include="System\DirectoryServices\ActiveDirectoryComInterop.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<ProjectReference Include="..\src\System.DirectoryServices.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
diff --git a/src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj b/src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj
index 5a34aa4d3ad..65731f1d129 100644
--- a/src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj
+++ b/src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj
@@ -3,7 +3,6 @@
<DefineConstants>$(DefineConstants);DRAWING_NAMESPACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<WarningsNotAsErrors>CS0618</WarningsNotAsErrors>
- <DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants);FEATURE_WINDOWS_SYSTEM_COLORS;FEATURE_SYSTEM_EVENTS</DefineConstants>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum)-Unix;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
<Nullable>enable</Nullable>
@@ -23,14 +22,16 @@ Unix support is disabled by default. See https://aka.ms/systemdrawingnonwindows
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'windows'">$(DefineConstants);FEATURE_WINDOWS_SYSTEM_COLORS;FEATURE_SYSTEM_EVENTS</DefineConstants>
<IncludeInternalObsoleteAttribute Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETFramework'">true</IncludeInternalObsoleteAttribute>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true' and $([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETFramework'">SR.SystemDrawingCommon_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETFramework' and '$(TargetPlatformIdentifier)' == ''">SR.SystemDrawingCommon_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\RequiresUnreferencedCodeAttribute.cs" />
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\UnconditionalSuppressMessageAttribute.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\Drawing\Bitmap.cs" />
<Compile Include="System\Drawing\BitmapSuffixInSameAssemblyAttribute.cs" />
<Compile Include="System\Drawing\BitmapSuffixInSatelliteAssemblyAttribute.cs" />
@@ -201,7 +202,7 @@ Unix support is disabled by default. See https://aka.ms/systemdrawingnonwindows
</EmbeddedResource>
</ItemGroup>
<!-- Windows-specific -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="SRDescriptionAttribute.cs" />
<Compile Include="System\Drawing\Bitmap.Windows.cs" />
<Compile Include="System\Drawing\BitmapSelector.cs" />
@@ -331,23 +332,14 @@ Unix support is disabled by default. See https://aka.ms/systemdrawingnonwindows
Link="Common\Interop\Windows\User32\Interop.WindowFromDC.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.HRESULT.cs"
Link="Common\Interop\Windows\Interop.HRESULT.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<Compile Include="$(CommonPath)Interop\Windows\Ole32\Interop.IStream.COMWrappers.cs"
Link="Common\Interop\Windows\Ole32\Interop.IStream.COMWrappers.cs" />
<Compile Include="System\Drawing\DrawingCom.COMWrappers.cs" />
<Compile Include="System\Drawing\Icon.Windows.COMWrappers.cs" />
<Compile Include="System\Drawing\Internal\GPStream.COMWrappers.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
- <Compile Include="$(CommonPath)Interop\Windows\Ole32\Interop.IStream.NoCOMWrappers.cs"
- Link="Common\Interop\Windows\Ole32\Interop.IStream.NoCOMWrappers.cs" />
- <Compile Include="System\Drawing\DrawingCom.NoCOMWrappers.cs" />
- <Compile Include="System\Drawing\Icon.Windows.NoCOMWrappers.cs" />
- <Compile Include="System\Drawing\Internal\GPStream.NoCOMWrappers.cs" />
- </ItemGroup>
<!-- Unix specific -->
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="System\Drawing\Graphics.Unix.cs" />
<Compile Include="System\Drawing\Icon.Unix.cs" />
<Compile Include="System\Drawing\SystemFonts.Unix.cs" />
@@ -393,7 +385,7 @@ Unix support is disabled by default. See https://aka.ms/systemdrawingnonwindows
<LogicalName>placeholder.ico</LogicalName>
</EmbeddedResource>
</ItemGroup>
- <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0')) and '$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0')) and '$(TargetPlatformIdentifier)' != ''">
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
<Compile Include="$(CommonPath)System\Runtime\InteropServices\HandleRefMarshaller.cs"
diff --git a/src/libraries/System.Drawing.Primitives/ref/System.Drawing.Primitives.csproj b/src/libraries/System.Drawing.Primitives/ref/System.Drawing.Primitives.csproj
index bfa339532ed..0ade64252f5 100644
--- a/src/libraries/System.Drawing.Primitives/ref/System.Drawing.Primitives.csproj
+++ b/src/libraries/System.Drawing.Primitives/ref/System.Drawing.Primitives.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Drawing.Primitives/src/System.Drawing.Primitives.csproj b/src/libraries/System.Drawing.Primitives/src/System.Drawing.Primitives.csproj
index e8328af20cd..dd2b9b692ad 100644
--- a/src/libraries/System.Drawing.Primitives/src/System.Drawing.Primitives.csproj
+++ b/src/libraries/System.Drawing.Primitives/src/System.Drawing.Primitives.csproj
@@ -1,10 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>System.Drawing</RootNamespace>
- <DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants);FEATURE_WINDOWS_SYSTEM_COLORS</DefineConstants>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
+ <PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'windows'">$(DefineConstants);FEATURE_WINDOWS_SYSTEM_COLORS</DefineConstants>
+ </PropertyGroup>
<ItemGroup>
<Compile Include="System\Drawing\KnownColorNames.cs" />
<Compile Include="System\Drawing\Point.cs" />
@@ -27,7 +31,7 @@
<Compile Include="$(CommonPath)System\Drawing\SystemColors.cs"
Link="System\Drawing\SystemColors.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\User32\Interop.GetSysColor.cs"
diff --git a/src/libraries/System.Dynamic.Runtime/ref/System.Dynamic.Runtime.csproj b/src/libraries/System.Dynamic.Runtime/ref/System.Dynamic.Runtime.csproj
index 17c5cc095dd..766e1e7d3b4 100644
--- a/src/libraries/System.Dynamic.Runtime/ref/System.Dynamic.Runtime.csproj
+++ b/src/libraries/System.Dynamic.Runtime/ref/System.Dynamic.Runtime.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Dynamic.Runtime/src/System.Dynamic.Runtime.csproj b/src/libraries/System.Dynamic.Runtime/src/System.Dynamic.Runtime.csproj
index 152b87d25dd..55eadef5a9a 100644
--- a/src/libraries/System.Dynamic.Runtime/src/System.Dynamic.Runtime.csproj
+++ b/src/libraries/System.Dynamic.Runtime/src/System.Dynamic.Runtime.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Globalization.Calendars/ref/System.Globalization.Calendars.csproj b/src/libraries/System.Globalization.Calendars/ref/System.Globalization.Calendars.csproj
index ca034e36a68..b53ef51fbac 100644
--- a/src/libraries/System.Globalization.Calendars/ref/System.Globalization.Calendars.csproj
+++ b/src/libraries/System.Globalization.Calendars/ref/System.Globalization.Calendars.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Globalization.Calendars/src/System.Globalization.Calendars.csproj b/src/libraries/System.Globalization.Calendars/src/System.Globalization.Calendars.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Globalization.Calendars/src/System.Globalization.Calendars.csproj
+++ b/src/libraries/System.Globalization.Calendars/src/System.Globalization.Calendars.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Globalization.Extensions/ref/System.Globalization.Extensions.csproj b/src/libraries/System.Globalization.Extensions/ref/System.Globalization.Extensions.csproj
index 54c76201458..231fb39433f 100644
--- a/src/libraries/System.Globalization.Extensions/ref/System.Globalization.Extensions.csproj
+++ b/src/libraries/System.Globalization.Extensions/ref/System.Globalization.Extensions.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Globalization.Extensions/src/System.Globalization.Extensions.csproj b/src/libraries/System.Globalization.Extensions/src/System.Globalization.Extensions.csproj
index 495dad9cebe..6beae5c98db 100644
--- a/src/libraries/System.Globalization.Extensions/src/System.Globalization.Extensions.csproj
+++ b/src/libraries/System.Globalization.Extensions/src/System.Globalization.Extensions.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Runtime" />
diff --git a/src/libraries/System.Globalization/ref/System.Globalization.csproj b/src/libraries/System.Globalization/ref/System.Globalization.csproj
index 9a0c64de5b0..5cf1bb07a61 100644
--- a/src/libraries/System.Globalization/ref/System.Globalization.csproj
+++ b/src/libraries/System.Globalization/ref/System.Globalization.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Globalization/src/System.Globalization.csproj b/src/libraries/System.Globalization/src/System.Globalization.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Globalization/src/System.Globalization.csproj
+++ b/src/libraries/System.Globalization/src/System.Globalization.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.Compression.Brotli/ref/System.IO.Compression.Brotli.csproj b/src/libraries/System.IO.Compression.Brotli/ref/System.IO.Compression.Brotli.csproj
index bce17a52f8f..662f5a31b64 100644
--- a/src/libraries/System.IO.Compression.Brotli/ref/System.IO.Compression.Brotli.csproj
+++ b/src/libraries/System.IO.Compression.Brotli/ref/System.IO.Compression.Brotli.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.Compression.Brotli.cs" />
diff --git a/src/libraries/System.IO.Compression.Brotli/src/System.IO.Compression.Brotli.csproj b/src/libraries/System.IO.Compression.Brotli/src/System.IO.Compression.Brotli.csproj
index 80ad7a7940b..6786fda1658 100644
--- a/src/libraries/System.IO.Compression.Brotli/src/System.IO.Compression.Brotli.csproj
+++ b/src/libraries/System.IO.Compression.Brotli/src/System.IO.Compression.Brotli.csproj
@@ -6,9 +6,10 @@
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.IOCompressionBrotli_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.IOCompressionBrotli_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="$(CommonPath)Interop\Interop.Brotli.cs" />
<!-- The native compression lib uses a BROTLI_BOOL type analogous to the Windows BOOL type -->
<Compile Include="$(CommonPath)Interop\Windows\Interop.BOOL.cs" />
@@ -26,12 +27,12 @@
Link="Common\Microsoft\Win32\SafeHandles\SafeBrotliHandle.cs" />
</ItemGroup>
<!-- Windows specific files -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
</ItemGroup>
<!-- Unix specific files -->
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' ">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' ">
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
</ItemGroup>
diff --git a/src/libraries/System.IO.Compression.ZipFile/ref/System.IO.Compression.ZipFile.csproj b/src/libraries/System.IO.Compression.ZipFile/ref/System.IO.Compression.ZipFile.csproj
index 1c175660be3..a72c3f36f42 100644
--- a/src/libraries/System.IO.Compression.ZipFile/ref/System.IO.Compression.ZipFile.csproj
+++ b/src/libraries/System.IO.Compression.ZipFile/ref/System.IO.Compression.ZipFile.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj b/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj
index 66827e87964..de869f13e93 100644
--- a/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj
+++ b/src/libraries/System.IO.Compression.ZipFile/src/System.IO.Compression.ZipFile.csproj
@@ -17,7 +17,7 @@
Link="Common\System\IO\PathInternal.CaseSensitivity.cs" />
</ItemGroup>
<!-- Unix specific files -->
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true' ">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="System\IO\Compression\ZipFileExtensions.ZipArchive.Create.Unix.cs" />
<Compile Include="System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.IOErrors.cs"
diff --git a/src/libraries/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj b/src/libraries/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj
index 94aa77c9c9a..7e9194ebe8e 100644
--- a/src/libraries/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj
+++ b/src/libraries/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj
@@ -36,7 +36,7 @@
<Compile Include="$(CommonTestPath)System\IO\Compression\ZipTestHelper.cs"
Link="Common\System\IO\Compression\ZipTestHelper.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true' ">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="ZipFile.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs" Link="Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.ChMod.cs" Link="Interop\Unix\System.Native\Interop.ChMod.cs" />
diff --git a/src/libraries/System.IO.Compression/ref/System.IO.Compression.csproj b/src/libraries/System.IO.Compression/ref/System.IO.Compression.csproj
index 8b14159415b..ff7cf6d8c38 100644
--- a/src/libraries/System.IO.Compression/ref/System.IO.Compression.csproj
+++ b/src/libraries/System.IO.Compression/ref/System.IO.Compression.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj b/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj
index 8a33c737f13..4d5e69f94d8 100644
--- a/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj
+++ b/src/libraries/System.IO.Compression/src/System.IO.Compression.csproj
@@ -44,13 +44,13 @@
Link="Common\System\Threading\Tasks\TaskToApm.cs" />
</ItemGroup>
<!-- Windows specific files -->
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\IO\Compression\ZipArchiveEntry.Windows.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
</ItemGroup>
<!-- Unix specific files -->
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true' ">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="System\IO\Compression\ZipArchiveEntry.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
diff --git a/src/libraries/System.IO.FileSystem.AccessControl/ref/System.IO.FileSystem.AccessControl.csproj b/src/libraries/System.IO.FileSystem.AccessControl/ref/System.IO.FileSystem.AccessControl.csproj
index 5aab0ab8163..da1ac825505 100644
--- a/src/libraries/System.IO.FileSystem.AccessControl/ref/System.IO.FileSystem.AccessControl.csproj
+++ b/src/libraries/System.IO.FileSystem.AccessControl/ref/System.IO.FileSystem.AccessControl.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.FileSystem.AccessControl/src/System.IO.FileSystem.AccessControl.csproj b/src/libraries/System.IO.FileSystem.AccessControl/src/System.IO.FileSystem.AccessControl.csproj
index e7a90eb3a6e..28465e91788 100644
--- a/src/libraries/System.IO.FileSystem.AccessControl/src/System.IO.FileSystem.AccessControl.csproj
+++ b/src/libraries/System.IO.FileSystem.AccessControl/src/System.IO.FileSystem.AccessControl.csproj
@@ -5,11 +5,12 @@
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <AllowUnsafeBlocks Condition="'$(TargetsWindows)' == 'true'">true</AllowUnsafeBlocks>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <AllowUnsafeBlocks Condition="'$(TargetPlatformIdentifier)' == 'windows'">true</AllowUnsafeBlocks>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
<!-- Source includes -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Errors.cs"
@@ -88,20 +89,20 @@
Link="Common\System\IO\FileSystem.DirectoryCreation.Windows.cs" />
</ItemGroup>
<ItemGroup>
- <Reference Include="System.Buffers" Condition="'$(TargetsWindows)' == 'true'" />
- <Reference Include="System.Collections" Condition="'$(TargetsWindows)' == 'true'" />
+ <Reference Include="System.Buffers" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
+ <Reference Include="System.Collections" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Reference Include="System.Collections.NonGeneric" />
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.IO.FileSystem" />
- <Reference Include="System.Memory" Condition="'$(TargetsWindows)' == 'true'" />
+ <Reference Include="System.Memory" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
- <Reference Include="System.Runtime.CompilerServices.Unsafe" Condition="'$(TargetsWindows)' == 'true'" />
+ <Reference Include="System.Runtime.CompilerServices.Unsafe" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Reference Include="System.Runtime.Extensions" />
<Reference Include="System.Runtime.Handles" />
- <Reference Include="System.Runtime.InteropServices" Condition="'$(TargetsWindows)' == 'true'" />
+ <Reference Include="System.Runtime.InteropServices" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Reference Include="System.Security.AccessControl" />
<Reference Include="System.Security.Principal.Windows" />
- <Reference Include="System.Threading.Tasks" Condition="'$(TargetsWindows)' == 'true'" />
+ <Reference Include="System.Threading.Tasks" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.csproj b/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.csproj
index 9f6b2e37bcd..bd014e7f4b1 100644
--- a/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.csproj
+++ b/src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj b/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj
index 7cdd5006490..686750ba949 100644
--- a/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj
+++ b/src/libraries/System.IO.FileSystem.DriveInfo/src/System.IO.FileSystem.DriveInfo.csproj
@@ -19,7 +19,7 @@
<Compile Include="System\IO\DriveInfo.UnixOrDefault.cs" />
<Compile Include="System\IO\DriveInfo.Default.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\IO\Error.cs" />
<Compile Include="System\IO\DriveInfo.Windows.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
@@ -53,7 +53,7 @@
<Compile Include="$(CoreLibSharedDir)System\IO\DriveInfoInternal.Windows.cs"
Link="Common\System\IO\DriveInfoInternal.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="System\IO\DriveInfo.UnixOrDefault.cs" />
<Compile Include="System\IO\DriveInfo.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/tests/System.IO.FileSystem.DriveInfo.Tests.csproj b/src/libraries/System.IO.FileSystem.DriveInfo/tests/System.IO.FileSystem.DriveInfo.Tests.csproj
index fa6aaa94a54..00d1afd3c94 100644
--- a/src/libraries/System.IO.FileSystem.DriveInfo/tests/System.IO.FileSystem.DriveInfo.Tests.csproj
+++ b/src/libraries/System.IO.FileSystem.DriveInfo/tests/System.IO.FileSystem.DriveInfo.Tests.csproj
@@ -3,10 +3,10 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
- <Compile Include="DriveInfo.Unix.Tests.cs" Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'" />
- <Compile Include="DriveInfo.Windows.Tests.cs" Condition="'$(TargetsWindows)' == 'true'" />
- <Compile Include="VirtualDrives.Windows.Tests.cs" Condition="'$(TargetsWindows)' == 'true'" />
- <Compile Include="$(CommonTestPath)System\IO\VirtualDriveHelper.Windows.cs" Link="Common\System\IO\VirtualDriveHelper.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="DriveInfo.Unix.Tests.cs" Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'" />
+ <Compile Include="DriveInfo.Windows.Tests.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
+ <Compile Include="VirtualDrives.Windows.Tests.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
+ <Compile Include="$(CommonTestPath)System\IO\VirtualDriveHelper.Windows.cs" Link="Common\System\IO\VirtualDriveHelper.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="$(CommonTestPath)TestUtilities\System\DisableParallelizationPerAssembly.cs" />
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/src/libraries/System.IO.FileSystem.Primitives/ref/System.IO.FileSystem.Primitives.csproj b/src/libraries/System.IO.FileSystem.Primitives/ref/System.IO.FileSystem.Primitives.csproj
index 31a3c74ddc9..d3418bd9442 100644
--- a/src/libraries/System.IO.FileSystem.Primitives/ref/System.IO.FileSystem.Primitives.csproj
+++ b/src/libraries/System.IO.FileSystem.Primitives/ref/System.IO.FileSystem.Primitives.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.FileSystem.Primitives/src/System.IO.FileSystem.Primitives.csproj b/src/libraries/System.IO.FileSystem.Primitives/src/System.IO.FileSystem.Primitives.csproj
index 94d0c640130..36c7cb1bdde 100644
--- a/src/libraries/System.IO.FileSystem.Primitives/src/System.IO.FileSystem.Primitives.csproj
+++ b/src/libraries/System.IO.FileSystem.Primitives/src/System.IO.FileSystem.Primitives.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.csproj b/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.csproj
index 2ee74d6667a..d9fca4d4667 100644
--- a/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.csproj
+++ b/src/libraries/System.IO.FileSystem.Watcher/ref/System.IO.FileSystem.Watcher.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj b/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj
index f8a57395aa6..b31c940615c 100644
--- a/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj
+++ b/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj
@@ -1,14 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent);$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-MacCatalyst;$(NetCoreAppCurrent)-FreeBSD</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-MacCatalyst;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.FileSystemWatcher_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.FileSystemWatcher_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\HResults.cs" />
<Compile Include="System\IO\ErrorEventArgs.cs" />
<Compile Include="System\IO\ErrorEventHandler.cs" />
@@ -32,7 +33,7 @@
<Compile Include="$(CommonPath)System\Text\ValueStringBuilder.cs"
Link="Common\System\Text\ValueStringBuilder.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)System\IO\PathInternal.Windows.cs"
Link="Common\System\IO\PathInternal.Windows.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
@@ -50,13 +51,11 @@
</Compile>
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.CloseHandle.cs"
Link="Common\Interop\Windows\Interop.CloseHandle.cs" />
- </ItemGroup>
- <!-- Windows : Win32 only -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.CreateFile.cs"
Link="Common\Interop\Windows\Interop.CreateFile.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true'">
+ <!-- Unix -->
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.Read.cs"
@@ -70,7 +69,7 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.PathConf.cs"
Link="Common\Interop\Unix\Interop.PathConf.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsLinux)' == 'true' or '$(TargetsFreeBSD)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'FreeBSD'">
<Compile Include="System\IO\FileSystemWatcher.Linux.cs" />
<Compile Include="$(CommonPath)Interop\Linux\System.Native\Interop.INotify.cs"
Link="Common\Interop\Linux\Interop.inotify.cs" />
@@ -81,7 +80,7 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.Stat.cs"
Link="Common\Interop\Unix\Interop.Stat.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsOSX)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'MacCatalyst'">
<Compile Include="System\IO\FileSystemWatcher.OSX.cs" />
<Compile Include="$(CoreLibSharedDir)System\IO\FileSystem.Exists.Unix.cs"
Link="System\IO\FileSystem.Exists.Unix.cs" />
@@ -110,7 +109,7 @@
<Compile Include="$(CommonPath)System\Text\ValueUtf8Converter.cs"
Link="Common\System\Text\ValueUtf8Converter.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnknownUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'UnknownUnix'">
<Compile Include="System\IO\FileSystemWatcher.UnknownUnix.cs" />
</ItemGroup>
<ItemGroup>
@@ -126,7 +125,7 @@
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Overlapped" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
<Reference Include="System.Collections" />
<Reference Include="System.Threading.Thread" />
</ItemGroup>
diff --git a/src/libraries/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj b/src/libraries/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj
index 7bbb9eb5986..381f9dfc4e4 100644
--- a/src/libraries/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj
+++ b/src/libraries/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj
@@ -46,15 +46,15 @@
<Compile Include="$(CommonPath)System\Text\ValueStringBuilder.cs"
Link="Common\System\Text\ValueStringBuilder.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)System\IO\PathInternal.Windows.cs"
Link="Common\System\IO\PathInternal.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="$(CommonPath)System\IO\PathInternal.Unix.cs"
Link="Common\System\IO\PathInternal.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsLinux)' == 'true' or '$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'OSX'">
<Compile Include="FileSystemWatcher.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
diff --git a/src/libraries/System.IO.FileSystem/ref/System.IO.FileSystem.csproj b/src/libraries/System.IO.FileSystem/ref/System.IO.FileSystem.csproj
index 0ceabbf133b..cf4cf19f19d 100644
--- a/src/libraries/System.IO.FileSystem/ref/System.IO.FileSystem.csproj
+++ b/src/libraries/System.IO.FileSystem/ref/System.IO.FileSystem.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.FileSystem/src/System.IO.FileSystem.csproj b/src/libraries/System.IO.FileSystem/src/System.IO.FileSystem.csproj
index 91447b65b71..8d75eca3bbe 100644
--- a/src/libraries/System.IO.FileSystem/src/System.IO.FileSystem.csproj
+++ b/src/libraries/System.IO.FileSystem/src/System.IO.FileSystem.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.FileSystem/tests/DisabledFileLockingTests/System.IO.FileSystem.DisabledFileLocking.Tests.csproj b/src/libraries/System.IO.FileSystem/tests/DisabledFileLockingTests/System.IO.FileSystem.DisabledFileLocking.Tests.csproj
index cefda710977..99230625e3c 100644
--- a/src/libraries/System.IO.FileSystem/tests/DisabledFileLockingTests/System.IO.FileSystem.DisabledFileLocking.Tests.csproj
+++ b/src/libraries/System.IO.FileSystem/tests/DisabledFileLockingTests/System.IO.FileSystem.DisabledFileLocking.Tests.csproj
@@ -24,7 +24,7 @@
<Compile Include="$(CommonTestPath)System\IO\PathFeatures.cs" Link="Common\System\IO\PathFeatures.cs" />
<Compile Include="$(CommonTestPath)TestUtilities\System\DisableParallelization.cs" Link="Common\TestUtilities\System\DisableParallelization.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup>
<Compile Remove="..\**\*.Windows.cs" />
<Compile Remove="..\**\*.Browser.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs" Link="Interop\Unix\Interop.Libraries.cs" />
diff --git a/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj b/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj
index 967338535cd..053c913a456 100644
--- a/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj
+++ b/src/libraries/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj
@@ -71,12 +71,12 @@
<Compile Include="RandomAccess\WriteGather.cs" />
<Compile Include="RandomAccess\WriteGatherAsync.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="FileSystemTest.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs" Link="Interop\Unix\Interop.Libraries.cs" />
<Compile Include="FileStream\ctor_options.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="Directory\Delete.Windows.cs" />
<Compile Include="File\EncryptDecrypt.Windows.cs" />
<Compile Include="FileSystemTest.Windows.cs" />
@@ -103,7 +103,7 @@
<ProjectReference Include="$(LibrariesProjectRoot)System.ServiceProcess.ServiceController\src\System.ServiceProcess.ServiceController.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.FileSystem.AccessControl\src\System.IO.FileSystem.AccessControl.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="FileSystemTest.Browser.cs" />
<Compile Include="FileStream\ctor_options.Browser.cs" />
</ItemGroup>
diff --git a/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.csproj b/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.csproj
index 39903d836f8..167ebaf32a1 100644
--- a/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.csproj
+++ b/src/libraries/System.IO.IsolatedStorage/ref/System.IO.IsolatedStorage.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.IsolatedStorage/src/System.IO.IsolatedStorage.csproj b/src/libraries/System.IO.IsolatedStorage/src/System.IO.IsolatedStorage.csproj
index 40664e48643..025f454662f 100644
--- a/src/libraries/System.IO.IsolatedStorage/src/System.IO.IsolatedStorage.csproj
+++ b/src/libraries/System.IO.IsolatedStorage/src/System.IO.IsolatedStorage.csproj
@@ -1,12 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)</TargetFrameworks>
- <Nullable>enable</Nullable>
+ <Nullable>enable</Nullable>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.IsolatedStorage_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.IsolatedStorage_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\IO\IsolatedStorage\IsolatedStorageException.cs" />
<Compile Include="System\IO\IsolatedStorage\IsolatedStorageFile.cs" />
<Compile Include="System\IO\IsolatedStorage\IsolatedStorageFileStream.cs" />
@@ -18,24 +20,22 @@
<Compile Include="$(CommonPath)System\Security\IdentityHelper.cs"
Link="Common\System\Security\IdentityHelper.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\IO\IsolatedStorage\Helper.Win32.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="System\IO\IsolatedStorage\Helper.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup>
<Reference Include="System.IO.FileSystem" />
+ <Reference Include="System.IO.FileSystem.AccessControl" />
<Reference Include="System.Linq" />
+ <Reference Include="System.Runtime" />
<Reference Include="System.Runtime.Extensions" />
+ <Reference Include="System.Security.AccessControl" />
<Reference Include="System.Security.Cryptography" />
<Reference Include="System.Security.Cryptography.Algorithms" />
- <Reference Include="System.Threading" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="System.IO.FileSystem.AccessControl" />
- <Reference Include="System.Runtime" />
- <Reference Include="System.Security.AccessControl" />
<Reference Include="System.Security.Principal.Windows" />
+ <Reference Include="System.Threading" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj b/src/libraries/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj
index 6f9c8a97195..b075376fa8b 100644
--- a/src/libraries/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj
+++ b/src/libraries/System.IO.IsolatedStorage/tests/System.IO.IsolatedStorage.Tests.csproj
@@ -13,11 +13,11 @@
Link="Internals\Helper.Win32Unix.cs" />
<Compile Include="System\IO\IsolatedStorage\HelperTests.Win32Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.Win32.cs"
Link="Internals\Helper.Win32.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.Unix.cs"
Link="Internals\Helper.Unix.cs" />
</ItemGroup>
diff --git a/src/libraries/System.IO.MemoryMappedFiles/ref/System.IO.MemoryMappedFiles.csproj b/src/libraries/System.IO.MemoryMappedFiles/ref/System.IO.MemoryMappedFiles.csproj
index 328e5db6032..06957485174 100644
--- a/src/libraries/System.IO.MemoryMappedFiles/ref/System.IO.MemoryMappedFiles.csproj
+++ b/src/libraries/System.IO.MemoryMappedFiles/ref/System.IO.MemoryMappedFiles.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.MemoryMappedFiles.cs" />
diff --git a/src/libraries/System.IO.MemoryMappedFiles/src/System.IO.MemoryMappedFiles.csproj b/src/libraries/System.IO.MemoryMappedFiles/src/System.IO.MemoryMappedFiles.csproj
index 6285027286b..156867fd41b 100644
--- a/src/libraries/System.IO.MemoryMappedFiles/src/System.IO.MemoryMappedFiles.csproj
+++ b/src/libraries/System.IO.MemoryMappedFiles/src/System.IO.MemoryMappedFiles.csproj
@@ -22,7 +22,7 @@
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\IO\MemoryMappedFiles\Interop.Windows.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.CreateFileMapping.cs"
Link="Common\Interop\Windows\Interop.CreateFileMapping.cs" />
@@ -81,7 +81,7 @@
<Compile Include="System\IO\MemoryMappedFiles\MemoryMappedFile.Windows.cs" />
<Compile Include="System\IO\MemoryMappedFiles\MemoryMappedView.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true' ">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser' ">
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Errors.cs"
diff --git a/src/libraries/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj b/src/libraries/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj
index 92042aa78f2..614f9b602b1 100644
--- a/src/libraries/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj
+++ b/src/libraries/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj
@@ -15,8 +15,8 @@
<Compile Include="MemoryMappedViewStream.Tests.cs" />
<Compile Include="MemoryMappedViewAccessor.Tests.cs" />
<Compile Include="MemoryMappedFilesTestsBase.cs" />
- <Compile Include="MemoryMappedFilesTestsBase.Unix.cs" Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'" />
- <Compile Include="MemoryMappedFilesTestsBase.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="MemoryMappedFilesTestsBase.Unix.cs" Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'" />
+ <Compile Include="MemoryMappedFilesTestsBase.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="$(CommonTestPath)System\IO\TempFile.cs" Link="Common\System\IO\TempFile.cs" />
<Compile Include="SafeMemoryMappedViewHandleTests.cs" />
<Compile Include="XunitAssemblyAttributes.cs" />
diff --git a/src/libraries/System.IO.Pipes.AccessControl/ref/System.IO.Pipes.AccessControl.csproj b/src/libraries/System.IO.Pipes.AccessControl/ref/System.IO.Pipes.AccessControl.csproj
index 685a31dbdf2..7a5d6dbd57b 100644
--- a/src/libraries/System.IO.Pipes.AccessControl/ref/System.IO.Pipes.AccessControl.csproj
+++ b/src/libraries/System.IO.Pipes.AccessControl/ref/System.IO.Pipes.AccessControl.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.Pipes.AccessControl/src/System.IO.Pipes.AccessControl.csproj b/src/libraries/System.IO.Pipes.AccessControl/src/System.IO.Pipes.AccessControl.csproj
index 5e08c91b938..34382fb6082 100644
--- a/src/libraries/System.IO.Pipes.AccessControl/src/System.IO.Pipes.AccessControl.csproj
+++ b/src/libraries/System.IO.Pipes.AccessControl/src/System.IO.Pipes.AccessControl.csproj
@@ -6,14 +6,15 @@
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
- <IsPartialFacadeAssembly Condition="'$(TargetsWindows)' == 'true'">true</IsPartialFacadeAssembly>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <IsPartialFacadeAssembly Condition="'$(TargetPlatformIdentifier)' == 'windows'">true</IsPartialFacadeAssembly>
<OmitResources Condition="'$(IsPartialFacadeAssembly)' == 'true'">true</OmitResources>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.Pipes\src\System.IO.Pipes.csproj">
- <SkipUseReferenceAssembly Condition="'$(TargetsWindows)' == 'true'">true</SkipUseReferenceAssembly>
+ <SkipUseReferenceAssembly Condition="'$(TargetPlatformIdentifier)' == 'windows'">true</SkipUseReferenceAssembly>
</ProjectReference>
<Reference Include="System.Runtime" />
<Reference Include="System.Security.AccessControl" />
diff --git a/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.csproj b/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.csproj
index bc664b2c290..adef3b2144f 100644
--- a/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.csproj
+++ b/src/libraries/System.IO.Pipes/ref/System.IO.Pipes.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj b/src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj
index 0cf60c20c9a..e3e522f09b6 100644
--- a/src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj
+++ b/src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj
@@ -5,11 +5,13 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.Pipes_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.Pipes_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
<!-- Compiled Source Files -->
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="Microsoft\Win32\SafeHandles\SafePipeHandle.cs" />
<Compile Include="System\IO\Error.cs" />
<Compile Include="System\IO\Pipes\AnonymousPipeClientStream.cs" />
@@ -26,7 +28,7 @@
<Compile Include="$(CommonPath)System\Threading\Tasks\TaskToApm.cs"
Link="Common\System\Threading\Tasks\TaskToApm.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.CloseHandle.cs"
@@ -108,14 +110,14 @@
<Compile Include="System\IO\Pipes\PipeStream.Windows.cs" />
</ItemGroup>
<!-- Windows : Win32 only -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.CreateNamedPipeClient.cs"
Link="Common\Interop\Windows\Interop.CreateNamedPipeClient.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.LoadLibraryEx_IntPtr.cs"
Link="Common\Interop\Windows\Interop.LoadLibraryEx_IntPtr.cs" />
<Compile Include="System\IO\Pipes\NamedPipeServerStream.Win32.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="Microsoft\Win32\SafeHandles\SafePipeHandle.Unix.cs" />
<Compile Include="System\IO\Pipes\AnonymousPipeServerStream.Unix.cs" />
<Compile Include="System\IO\Pipes\NamedPipeClientStream.Unix.cs" />
@@ -177,11 +179,11 @@
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Overlapped" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Reference Include="System.Collections.NonGeneric" />
<Reference Include="System.Security.Claims" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.IO.FileSystem" />
<Reference Include="System.Net.Primitives" />
diff --git a/src/libraries/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj b/src/libraries/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj
index 52ce3056b53..dcec96f7ec5 100644
--- a/src/libraries/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj
+++ b/src/libraries/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj
@@ -10,7 +10,7 @@
<Compile Include="AssemblyInfo.cs" />
<Compile Include="XunitAssemblyAttributes.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="AnonymousPipeTests\AnonymousPipeTest.CreateServer.cs" />
<Compile Include="AnonymousPipeTests\AnonymousPipeTest.CreateClient.cs" />
<Compile Include="AnonymousPipeTests\AnonymousPipeTest.CrossProcess.cs" />
@@ -23,7 +23,7 @@
<Compile Include="PipeStreamConformanceTests.cs" />
<Compile Include="$(CommonTestPath)System\Threading\Tasks\TaskTimeoutExtensions.cs" Link="Common\System\Threading\Tasks\TaskTimeoutExtensions.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="NamedPipeTests\NamedPipeTest.CurrentUserOnly.cs" />
<Compile Include="NamedPipeTests\NamedPipeTest.CurrentUserOnly.Windows.cs" />
<Compile Include="NamedPipeTests\NamedPipeTest.RunAsClient.Windows.cs" />
@@ -35,7 +35,7 @@
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.GetNamedPipeHandleState.cs" Link="Common\Interop\Windows\Interop.GetNamedPipeHandleState.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.MaxLengths.cs" Link="Common\Interop\Windows\Interop.MaxLengths.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="NamedPipeTests\NamedPipeTest.CurrentUserOnly.Unix.cs" />
<Compile Include="NamedPipeTests\NamedPipeTest.UnixDomainSockets.cs" />
<Compile Include="NamedPipeTests\NamedPipeTest.RunAsClient.Unix.cs" />
diff --git a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj
index 6dc6c00f09d..67e40c9fef6 100644
--- a/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj
+++ b/src/libraries/System.IO.Ports/src/System.IO.Ports.csproj
@@ -14,11 +14,12 @@ System.IO.Ports.SerialPort</PackageDescription>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsAnyOS)' == 'true'">SR.PlatformNotSupported_IOPorts</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' == ''">SR.PlatformNotSupported_IOPorts</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\IO\Ports\Handshake.cs" />
<Compile Include="System\IO\Ports\InternalResources.cs" />
<Compile Include="System\IO\Ports\Parity.cs" />
@@ -36,13 +37,12 @@ System.IO.Ports.SerialPort</PackageDescription>
<Compile Include="System\IO\Ports\StopBits.cs" />
</ItemGroup>
-
- <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0')) and '$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0')) and '$(TargetPlatformIdentifier)' != ''">
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\IO\Ports\SerialStream.Windows.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.DCB.cs"
Link="Common\Interop\Windows\Kernel32\Interop.DCB.cs" />
@@ -122,7 +122,7 @@ System.IO.Ports.SerialPort</PackageDescription>
Link="Common\Interop\Windows\Kernel32\Interop.FileOperations.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="System\IO\Ports\SafeSerialDeviceHandle.Unix.cs" />
<Compile Include="System\IO\Ports\SerialPort.Unix.cs" />
<Compile Include="System\IO\Ports\SerialStream.Unix.cs" />
@@ -144,17 +144,17 @@ System.IO.Ports.SerialPort</PackageDescription>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<Reference Include="Microsoft.Win32.Primitives" />
- <Reference Include="Microsoft.Win32.Registry" Condition="'$(TargetsWindows)' == 'true'" />
+ <Reference Include="Microsoft.Win32.Registry" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Reference Include="System.Collections" />
- <Reference Include="System.Collections.Concurrent" Condition="'$(TargetsUnix)' == 'true'" />
+ <Reference Include="System.Collections.Concurrent" Condition="'$(TargetPlatformIdentifier)' == 'Unix'" />
<Reference Include="System.ComponentModel.Primitives" />
<Reference Include="System.Memory" />
<Reference Include="System.Net.Primitives" />
- <Reference Include="System.Net.Sockets" Condition="'$(TargetsUnix)' == 'true'" />
+ <Reference Include="System.Net.Sockets" Condition="'$(TargetPlatformIdentifier)' == 'Unix'" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Runtime.InteropServices" />
- <Reference Include="System.Runtime.InteropServices.RuntimeInformation" Condition="'$(TargetsUnix)' == 'true'" />
+ <Reference Include="System.Runtime.InteropServices.RuntimeInformation" Condition="'$(TargetPlatformIdentifier)' == 'Unix'" />
<Reference Include="System.Text.Encoding.Extensions" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Thread" />
diff --git a/src/libraries/System.IO.Ports/tests/System.IO.Ports.Tests.csproj b/src/libraries/System.IO.Ports/tests/System.IO.Ports.Tests.csproj
index 36756fdbb54..9a1592778a7 100644
--- a/src/libraries/System.IO.Ports/tests/System.IO.Ports.Tests.csproj
+++ b/src/libraries/System.IO.Ports/tests/System.IO.Ports.Tests.csproj
@@ -109,7 +109,7 @@
<Compile Include="Support\PortsTest.cs" />
<Compile Include="Support\TestEventHandler.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' or '$(TargetFrameworkIdentifier)' == '.NETFramework'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows' or '$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Compile Include="SerialPort\DosDevices.cs" />
<Compile Include="SerialPort\PortName.cs" />
<Compile Include="SerialPort\OpenDevices.cs" />
diff --git a/src/libraries/System.IO.UnmanagedMemoryStream/ref/System.IO.UnmanagedMemoryStream.csproj b/src/libraries/System.IO.UnmanagedMemoryStream/ref/System.IO.UnmanagedMemoryStream.csproj
index 0ee67eedafd..af369779eba 100644
--- a/src/libraries/System.IO.UnmanagedMemoryStream/ref/System.IO.UnmanagedMemoryStream.csproj
+++ b/src/libraries/System.IO.UnmanagedMemoryStream/ref/System.IO.UnmanagedMemoryStream.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO.UnmanagedMemoryStream/src/System.IO.UnmanagedMemoryStream.csproj b/src/libraries/System.IO.UnmanagedMemoryStream/src/System.IO.UnmanagedMemoryStream.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.IO.UnmanagedMemoryStream/src/System.IO.UnmanagedMemoryStream.csproj
+++ b/src/libraries/System.IO.UnmanagedMemoryStream/src/System.IO.UnmanagedMemoryStream.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO/ref/System.IO.csproj b/src/libraries/System.IO/ref/System.IO.csproj
index 7439befee6f..0ea49f44dad 100644
--- a/src/libraries/System.IO/ref/System.IO.csproj
+++ b/src/libraries/System.IO/ref/System.IO.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.IO/src/System.IO.csproj b/src/libraries/System.IO/src/System.IO.csproj
index 3b108d68267..e2eb3417533 100644
--- a/src/libraries/System.IO/src/System.IO.csproj
+++ b/src/libraries/System.IO/src/System.IO.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Linq.Expressions/ref/System.Linq.Expressions.csproj b/src/libraries/System.Linq.Expressions/ref/System.Linq.Expressions.csproj
index 024288147d0..8ce6d5b7370 100644
--- a/src/libraries/System.Linq.Expressions/ref/System.Linq.Expressions.csproj
+++ b/src/libraries/System.Linq.Expressions/ref/System.Linq.Expressions.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<NoWarn>$(NoWarn);CS0618</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
diff --git a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj
index dce8fedbf2a..fba337b000b 100644
--- a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj
+++ b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj
@@ -3,16 +3,19 @@
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-MacCatalyst</TargetFrameworks>
<Nullable>enable</Nullable>
<IsInterpreting>false</IsInterpreting>
- <IsInterpreting Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">true</IsInterpreting>
- <ILLinkSubstitutionsLibraryBuildXml Condition="'$(IsInterpreting)' == 'true'">ILLink\ILLink.Substitutions.IsInterpreting.LibraryBuild.xml</ILLinkSubstitutionsLibraryBuildXml>
<DefineConstants> $(DefineConstants);FEATURE_FAST_CREATE</DefineConstants>
-
+ </PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
+ <PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <IsInterpreting Condition="'$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS' or '$(TargetPlatformIdentifier)' == 'MacCatalyst'">true</IsInterpreting>
+ <ILLinkSubstitutionsLibraryBuildXml Condition="'$(IsInterpreting)' == 'true'">ILLink\ILLink.Substitutions.IsInterpreting.LibraryBuild.xml</ILLinkSubstitutionsLibraryBuildXml>
<!--
Disable constant propagation so that methods referenced from ILLink.Substitutions.xml don't get inlined
with a wrong value at library build time and the substitution can still be selected at publish time.
For iOS/tvOS/Catalyst we prefer smaller size by default, so keep constprop enabled to get rid of the expression compiler.
-->
- <ILLinkDisableIPConstProp Condition="'$(TargetsiOS)' != 'true' and '$(TargetstvOS)' != 'true' and '$(TargetsMacCatalyst)' != 'true'">true</ILLinkDisableIPConstProp>
+ <ILLinkDisableIPConstProp Condition="'$(TargetPlatformIdentifier)' != 'iOS' and '$(TargetPlatformIdentifier)' != 'tvOS' and '$(TargetPlatformIdentifier)' != 'MacCatalyst'">true</ILLinkDisableIPConstProp>
</PropertyGroup>
<ItemGroup>
<ILLinkSubstitutionsXmls Include="$(ILLinkDirectory)ILLink.Substitutions.xml" />
diff --git a/src/libraries/System.Linq.Parallel/ref/System.Linq.Parallel.csproj b/src/libraries/System.Linq.Parallel/ref/System.Linq.Parallel.csproj
index 02094314ac0..7f0337a585c 100644
--- a/src/libraries/System.Linq.Parallel/ref/System.Linq.Parallel.csproj
+++ b/src/libraries/System.Linq.Parallel/ref/System.Linq.Parallel.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Linq.Parallel/src/System.Linq.Parallel.csproj b/src/libraries/System.Linq.Parallel/src/System.Linq.Parallel.csproj
index b78dd81e422..5d2db8f850a 100644
--- a/src/libraries/System.Linq.Parallel/src/System.Linq.Parallel.csproj
+++ b/src/libraries/System.Linq.Parallel/src/System.Linq.Parallel.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- Compiled Source Files -->
diff --git a/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.csproj b/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.csproj
index dc7cc09400a..ef12af1519a 100644
--- a/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.csproj
+++ b/src/libraries/System.Linq.Queryable/ref/System.Linq.Queryable.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Linq.Queryable/src/System.Linq.Queryable.csproj b/src/libraries/System.Linq.Queryable/src/System.Linq.Queryable.csproj
index d3def1d1063..0df3e5cb478 100644
--- a/src/libraries/System.Linq.Queryable/src/System.Linq.Queryable.csproj
+++ b/src/libraries/System.Linq.Queryable/src/System.Linq.Queryable.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Linq/ref/System.Linq.csproj b/src/libraries/System.Linq/ref/System.Linq.csproj
index f2c0fd1178a..476d2cbc4f0 100644
--- a/src/libraries/System.Linq/ref/System.Linq.csproj
+++ b/src/libraries/System.Linq/ref/System.Linq.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Linq/src/System.Linq.csproj b/src/libraries/System.Linq/src/System.Linq.csproj
index 4126dfb6414..508041619b3 100644
--- a/src/libraries/System.Linq/src/System.Linq.csproj
+++ b/src/libraries/System.Linq/src/System.Linq.csproj
@@ -2,7 +2,11 @@
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS</TargetFrameworks>
<Nullable>enable</Nullable>
- <OptimizeForSize Condition="'$(TargetsBrowser)' == 'true' or '$(TargetsAndroid)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">true</OptimizeForSize>
+ </PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
+ <PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <OptimizeForSize Condition="'$(TargetPlatformIdentifier)' == 'Browser' or '$(TargetPlatformIdentifier)' == 'Android' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">true</OptimizeForSize>
</PropertyGroup>
<ItemGroup Condition="'$(OptimizeForSize)' == true">
<Compile Include="System\Linq\Enumerable.SizeOpt.cs" />
diff --git a/src/libraries/System.Management/src/System.Management.csproj b/src/libraries/System.Management/src/System.Management.csproj
index e64ebcf61db..7f530935c20 100644
--- a/src/libraries/System.Management/src/System.Management.csproj
+++ b/src/libraries/System.Management/src/System.Management.csproj
@@ -20,9 +20,10 @@ System.Management.SelectQuery</PackageDescription>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_SystemManagement</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_SystemManagement</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.FreeLibrary.cs"
diff --git a/src/libraries/System.Memory/ref/System.Memory.csproj b/src/libraries/System.Memory/ref/System.Memory.csproj
index 85853190888..a1511feb880 100644
--- a/src/libraries/System.Memory/ref/System.Memory.csproj
+++ b/src/libraries/System.Memory/ref/System.Memory.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Memory/src/System.Memory.csproj b/src/libraries/System.Memory/src/System.Memory.csproj
index b9f9e1e818f..f11858f7e2f 100644
--- a/src/libraries/System.Memory/src/System.Memory.csproj
+++ b/src/libraries/System.Memory/src/System.Memory.csproj
@@ -3,7 +3,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<!-- ArrayBufferWriter is publicly exposed from the System.Memory ref and only it should define this constant as true. -->
<DefineConstants>$(DefineConstants);MAKE_ABW_PUBLIC</DefineConstants>
</PropertyGroup>
diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj b/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj
index 41d016898b1..e1aa13b7c86 100644
--- a/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj
+++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
- <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.1;netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
@@ -13,11 +13,11 @@ System.Net.Http.WinHttpHandler</PackageDescription>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETFramework' and
- '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_WinHttpHandler</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETFramework' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_WinHttpHandler</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' or '$(TargetFrameworkIdentifier)' == '.NETFramework'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CERT_CONTEXT.cs"
@@ -108,7 +108,7 @@ System.Net.Http.WinHttpHandler</PackageDescription>
Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
</ItemGroup>
- <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0')) and '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0-windows'))">
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
</ItemGroup>
@@ -135,7 +135,7 @@ System.Net.Http.WinHttpHandler</PackageDescription>
<Reference Include="System.Security.Cryptography" />
</ItemGroup>
- <ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.1'))">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
<!-- S.R.C.Unsafe isn't a primary but transitive dependency and this P2P makes sure that the live version is used. -->
diff --git a/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj b/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj
index 381230d2a9b..e9d68fbff06 100644
--- a/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj
+++ b/src/libraries/System.Net.Http.WinHttpHandler/tests/UnitTests/System.Net.Http.WinHttpHandler.Unit.Tests.csproj
@@ -11,7 +11,7 @@
<ItemGroup>
<DefaultReferenceExclusion Include="System.Net.Http.WinHttpHandler" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true' ">
+ <ItemGroup>
<Compile Include="$(CommonTestPath)System\Net\SslProtocolSupport.cs"
Link="CommonTest\System\Net\SslProtocolSupport.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
diff --git a/src/libraries/System.Net.Http/ref/System.Net.Http.csproj b/src/libraries/System.Net.Http/ref/System.Net.Http.csproj
index 1b20e03c790..beb13cf4500 100644
--- a/src/libraries/System.Net.Http/ref/System.Net.Http.csproj
+++ b/src/libraries/System.Net.Http/ref/System.Net.Http.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.Http/src/System.Net.Http.csproj b/src/libraries/System.Net.Http/src/System.Net.Http.csproj
index 0792ba26c05..41a0065fa03 100644
--- a/src/libraries/System.Net.Http/src/System.Net.Http.csproj
+++ b/src/libraries/System.Net.Http/src/System.Net.Http.csproj
@@ -6,41 +6,26 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-MacCatalyst;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-Solaris;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
- <PropertyGroup Condition=" '$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">
- <DefineConstants>$(DefineConstants);SYSNETHTTP_NO_OPENSSL</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true' or '$(TargetsTVOS)' == 'true'">
- <DefineConstants>$(DefineConstants);TARGET_MOBILE</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetsAndroid)' == 'true'">
- <DefineConstants>$(DefineConstants);TARGET_ANDROID</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetsiOS)' == 'true'">
- <DefineConstants>$(DefineConstants);TARGET_IOS</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetsMacCatalyst)' == 'true'">
- <DefineConstants>$(DefineConstants);TARGET_MACCATALYST</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetsTVOS)' == 'true'">
- <DefineConstants>$(DefineConstants);TARGET_TVOS</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetsBrowser)' == 'true'">
- <DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
- </PropertyGroup>
- <!-- ILLinker settings -->
- <PropertyGroup>
- <ILLinkDirectory>$(MSBuildThisFileDirectory)ILLink\</ILLinkDirectory>
- </PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.PlatformNotSupported_NetHttp</GeneratePlatformNotSupportedAssemblyMessage>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS' or '$(TargetPlatformIdentifier)' == 'MacCatalyst'">$(DefineConstants);SYSNETHTTP_NO_OPENSSL</DefineConstants>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'Android' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'MacCatalyst' or '$(TargetPlatformIdentifier)' == 'tvOS'">$(DefineConstants);TARGET_MOBILE</DefineConstants>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'Android'">$(DefineConstants);TARGET_ANDROID</DefineConstants>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'iOS'">$(DefineConstants);TARGET_IOS</DefineConstants>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'MacCatalyst'">$(DefineConstants);TARGET_MACCATALYST</DefineConstants>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'tvOS'">$(DefineConstants);TARGET_TVOS</DefineConstants>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'Browser'">$(DefineConstants);TARGET_BROWSER</DefineConstants>
+ <!-- ILLinker settings -->
+ <ILLinkDirectory>$(MSBuildThisFileDirectory)ILLink\</ILLinkDirectory>
</PropertyGroup>
<ItemGroup>
<ILLinkSubstitutionsXmls Include="$(ILLinkDirectory)ILLink.Substitutions.xml" />
- <ILLinkSubstitutionsXmls Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true' or '$(TargetsTVOS)' == 'true'"
- Include="$(ILLinkDirectory)ILLink.Substitutions.mobile.xml" />
- <ILLinkSuppressionsXmls Condition="'$(TargetsMobile)' == 'true'" Include="$(ILLinkDirectory)ILLink.Suppressions.Mobile.LibraryBuild.xml" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Android' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'MacCatalyst' or '$(TargetPlatformIdentifier)' == 'tvOS' or '$(TargetPlatformIdentifier)' == 'Browser'">
+ <ILLinkSubstitutionsXmls Include="$(ILLinkDirectory)ILLink.Substitutions.mobile.xml" Condition="'$(TargetPlatformIdentifier)' != 'Browser'" />
+ <ILLinkSuppressionsXmls Include="$(ILLinkDirectory)ILLink.Suppressions.Mobile.LibraryBuild.xml" />
</ItemGroup>
<ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\Net\Http\ByteArrayContent.cs" />
@@ -60,11 +45,11 @@
<Compile Include="System\Net\Http\Headers\KnownHeaders.cs" />
<Compile Include="System\Net\Http\HttpBaseStream.cs" />
<Compile Include="System\Net\Http\HttpClient.cs" />
- <Compile Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true' or '$(TargetsTVOS)' == 'true'"
+ <Compile Condition="'$(TargetPlatformIdentifier)' == 'Android' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'MacCatalyst' or '$(TargetPlatformIdentifier)' == 'tvOS'"
Include="System\Net\Http\HttpClientHandler.AnyMobile.cs" />
- <Compile Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsMacCatalyst)' == 'true' or '$(TargetsTVOS)' == 'true'"
+ <Compile Condition="'$(TargetPlatformIdentifier)' == 'Android' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'MacCatalyst' or '$(TargetPlatformIdentifier)' == 'tvOS'"
Include="System\Net\Http\HttpClientHandler.AnyMobile.InvokeNativeHandler.cs" />
- <Compile Condition="'$(TargetsAndroid)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetsMacCatalyst)' != 'true' and '$(TargetsTVOS)' != 'true'"
+ <Compile Condition="'$(TargetPlatformIdentifier)' != 'Android' and '$(TargetPlatformIdentifier)' != 'iOS' and '$(TargetPlatformIdentifier)' != 'MacCatalyst' and '$(TargetPlatformIdentifier)' != 'tvOS'"
Include="System\Net\Http\HttpClientHandler.cs" />
<Compile Include="System\Net\Http\HttpCompletionOption.cs" />
<Compile Include="System\Net\Http\HttpContent.cs" />
@@ -165,7 +150,7 @@
Link="Common\System\Net\Http\aspnetcore\Http3\QPack\H3StaticTable.cs" />
</ItemGroup>
<!-- SocketsHttpHandler implementation -->
- <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetsBrowser)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="System\Net\Http\HttpHandlerDefaults.cs" />
<Compile Include="System\Net\Http\HttpMethod.Http3.cs" />
<Compile Include="System\Net\Http\Headers\AltSvcHeaderParser.cs" />
@@ -173,7 +158,7 @@
<Compile Include="System\Net\Http\Headers\KnownHeader.Http2And3.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs" />
- <Compile Condition="'$(TargetstvOS)' != 'true'" Include="System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs" />
+ <Compile Condition="'$(TargetPlatformIdentifier)' != 'tvOS'" Include="System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\ChunkedEncodingWriteStream.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\ConnectHelper.cs" />
@@ -222,7 +207,7 @@
<Compile Include="System\Net\Http\SocketsHttpHandler\SystemProxyInfo.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\SocksHelper.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\SocksException.cs" />
- <Compile Condition="'$(TargetstvOS)' != 'true'" Include="$(CommonPath)System\Net\NTAuthentication.Common.cs"
+ <Compile Condition="'$(TargetPlatformIdentifier)' != 'tvOS'" Include="$(CommonPath)System\Net\NTAuthentication.Common.cs"
Link="Common\System\Net\NTAuthentication.Common.cs" />
<Compile Include="$(CommonPath)System\Net\ContextFlagsPal.cs"
Link="Common\System\Net\ContextFlagsPal.cs" />
@@ -332,17 +317,17 @@
</Compile>
</ItemGroup>
<!-- Linux specific files -->
- <ItemGroup Condition="'$(TargetsLinux)' == 'true' or '$(TargetsBrowser)' == 'true' ">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'Android' or '$(TargetPlatformIdentifier)' == 'Browser' ">
<Compile Include="$(CommonPath)Interop\Linux\Interop.Libraries.cs"
Link="Common\Interop\Linux\Interop.Libraries.cs" />
</ItemGroup>
<!-- FreeBSD specific files -->
- <ItemGroup Condition="'$(TargetsFreeBSD)' == 'true' ">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'FreeBSD' ">
<Compile Include="$(CommonPath)Interop\FreeBSD\Interop.Libraries.cs"
Link="Common\Interop\FreeBSD\Interop.Libraries.cs" />
</ItemGroup>
<!-- SocketsHttpHandler platform parts -->
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Unix.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\CurrentUserIdentityProvider.Unix.cs" />
@@ -361,7 +346,7 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.IsNtlmInstalled.cs"
Link="Common\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.IsNtlmInstalled.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' and '$(TargetstvOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier)' != 'Browser' and '$(TargetPlatformIdentifier)' != 'tvOS'">
<Compile Include="$(CommonPath)Interop\Unix\System.Net.Security.Native\Interop.GssApiException.cs"
Link="Common\Interop\Unix\System.Net.Security.Native\Interop.GssApiException.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs"
@@ -377,18 +362,18 @@
<Compile Include="$(CommonPath)System\Net\Security\NegotiateStreamPal.Unix.cs"
Link="Common\System\Net\Security\NegotiateStreamPal.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetstvOS)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'tvOS'">
<Compile Include="System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.tvOS.cs" />
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\GssSafeHandles.PlatformNotSupported.cs"
Link="Common\Microsoft\Win32\SafeHandles\GssSafeHandles.PlatformNotSupported.cs" />
<Compile Include="$(CommonPath)System\Net\Security\NegotiateStreamPal.PlatformNotSupported.cs"
Link="Common\System\Net\Security\NegotiateStreamPal.PlatformNotSupported.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' and '$(TargetsOSX)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetstvOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier)' != 'Browser' and '$(TargetPlatformIdentifier)' != 'OSX' and '$(TargetPlatformIdentifier)' != 'iOS' and '$(TargetPlatformIdentifier)' != 'tvOS'">
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpNoProxy.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">
<Compile Include="System\Net\Http\SocketsHttpHandler\SystemProxyInfo.OSX.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\MacProxy.cs" />
<Compile Include="$(CommonPath)Interop\OSX\Interop.CoreFoundation.cs"
@@ -416,7 +401,7 @@
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeCreateHandle.OSX.cs"
Link="Common\Microsoft\Win32\SafeHandles\SafeCreateHandle.OSX.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)\System\Net\HttpStatusDescription.cs"
Link="Common\System\Net\HttpStatusDescription.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Windows.cs" />
@@ -532,7 +517,7 @@
<Compile Include="$(CommonPath)Interop\Windows\SspiCli\SSPIWrapper.cs"
Link="Common\Interop\Windows\SspiCli\SSPIWrapper.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="$(CommonPath)System\StrongToWeakReference.cs"
Link="Common\Interop\Unix\StrongToWeakReference.cs" />
<Compile Include="$(CommonPath)System\Net\SecurityProtocol.cs"
@@ -582,7 +567,7 @@
<Compile Include="$(CommonPath)System\Threading\Tasks\TaskToApm.cs"
Link="Common\System\Threading\Tasks\TaskToApm.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' and '$(TargetsOSX)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetstvOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier)' != 'Browser' and '$(TargetPlatformIdentifier)' != 'OSX' and '$(TargetPlatformIdentifier)' != 'iOS' and '$(TargetPlatformIdentifier)' != 'tvOS'">
<Compile Include="$(CommonPath)Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs"
Link="Common\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Security.Cryptography.Native\Interop.BIO.cs"
@@ -630,7 +615,7 @@
<Compile Include="$(CommonPath)System\Net\Security\CertificateValidation.Unix.cs"
Link="Common\System\Net\Security\CertificateValidation.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="$(CommonPath)\System\StringExtensions.cs"
Link="Common\System\StringExtensions.cs" />
<Compile Include="$(CommonPath)\System\Net\HttpStatusDescription.cs"
@@ -669,27 +654,27 @@
<Reference Include="System.Runtime.Extensions" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
<Reference Include="System.Runtime.InteropServices" />
- <Reference Include="System.Security.Claims" Condition="'$(TargetsWindows)' == 'true'" />
+ <Reference Include="System.Security.Claims" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Reference Include="System.Security.Cryptography" />
<Reference Include="System.Security.Cryptography.Algorithms" />
<Reference Include="System.Security.Cryptography.Csp" />
<Reference Include="System.Security.Cryptography.Encoding" />
<Reference Include="System.Security.Cryptography.OpenSsl" />
<Reference Include="System.Security.Cryptography.X509Certificates" />
- <Reference Include="System.Security.Principal" Condition="'$(TargetsWindows)' == 'true'" />
+ <Reference Include="System.Security.Principal" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Reference Include="System.Security.Principal.Windows" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Channels" />
<Reference Include="System.IO.Compression.Brotli" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier)' != 'Browser'">
<Reference Include="System.Diagnostics.StackTrace" />
<Reference Include="System.IO.FileSystem" />
<Reference Include="System.Security.Cryptography.Algorithms" />
<Reference Include="System.Security.Cryptography.Encoding" />
<Reference Include="System.Security.Cryptography" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Runtime.InteropServices.JavaScript\src\System.Private.Runtime.InteropServices.JavaScript.csproj" />
</ItemGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj
index 1b4a5aa3769..f8d30de1f7b 100644
--- a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj
+++ b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<StringResourcesPath>../../src/Resources/Strings.resx</StringResourcesPath>
- <DefineConstants Condition="'$(TargetsWindows)'=='true'">$(DefineConstants);TargetsWindows</DefineConstants>
- <DefineConstants Condition="'$(TargetsBrowser)'=='true'">$(DefineConstants);TARGETS_BROWSER</DefineConstants>
<DefineConstants>$(DefineConstants);SYSNETHTTP_NO_OPENSSL;HTTP3</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
@@ -10,6 +8,13 @@
<EnableDllImportGenerator>true</EnableDllImportGenerator>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
+ <PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'windows'">$(DefineConstants);TargetsWindows</DefineConstants>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'Browser'">$(DefineConstants);TARGETS_BROWSER</DefineConstants>
+ </PropertyGroup>
+
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Net.SocketsHttpHandler.Http3Support" Value="true" />
</ItemGroup>
@@ -34,13 +39,13 @@
<ItemGroup>
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
- <Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs" Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'"
+ <Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs" Condition="'$(TargetPlatformIdentifier)' != 'windows'"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)System\Net\Logging\NetEventSource.Common.cs"
Link="Common\System\Net\Logging\NetEventSource.Common.cs" />
<Compile Include="$(CommonPath)System\Threading\Tasks\TaskToApm.cs"
Link="System\System\Threading\Tasks\TaskToApm.cs" />
- <Compile Include="$(CommonPath)Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.IsNtlmInstalled.cs" Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'"
+ <Compile Include="$(CommonPath)Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.IsNtlmInstalled.cs" Condition="'$(TargetPlatformIdentifier)' != 'windows'"
Link="Common\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.IsNtlmInstalled.cs" />
<Compile Include="$(CommonTestPath)System\Buffers\NativeMemoryManager.cs"
Link="Common\System\Buffers\NativeMemoryManager.cs" />
@@ -68,9 +73,9 @@
Link="Common\System\Net\HttpsTestServer.cs" />
<Compile Include="$(CommonTestPath)System\Net\Capability.Security.cs"
Link="Common\System\Net\Capability.Security.cs" />
- <Compile Include="$(CommonTestPath)System\Net\Capability.Security.Windows.cs" Condition="'$(TargetsWindows)' == 'true'"
+ <Compile Include="$(CommonTestPath)System\Net\Capability.Security.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'"
Link="Common\System\Net\Capability.Security.Windows.cs" />
- <Compile Include="$(CommonTestPath)System\Net\Capability.Security.Unix.cs" Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'"
+ <Compile Include="$(CommonTestPath)System\Net\Capability.Security.Unix.cs" Condition="'$(TargetPlatformIdentifier)' != 'windows'"
Link="Common\System\Net\Capability.Security.Unix.cs" />
<Compile Include="$(CommonTestPath)System\Net\Configuration.cs"
Link="Common\System\Net\Configuration.cs" />
@@ -162,7 +167,7 @@
<Compile Include="HttpClientHandlerTestBase.SocketsHttpHandler.cs" />
<Compile Include="DiagnosticsTests.cs" />
<Compile Include="HttpClientTest.cs" />
- <Compile Include="$(CommonTestPath)System\Net\Http\HttpClientEKUTest.cs" Condition="'$(TargetsBrowser)' != 'true'"
+ <Compile Include="$(CommonTestPath)System\Net\Http\HttpClientEKUTest.cs" Condition="'$(TargetPlatformIdentifier)' != 'Browser'"
Link="Common\System\Net\Http\HttpClientEKUTest.cs" />
<Compile Include="$(CommonTestPath)System\Net\Http\HttpClient.SelectedSitesTest.cs"
Link="Common\System\Net\Http\HttpClient.SelectedSitesTest.cs" />
@@ -209,7 +214,7 @@
Link="ProductionCode\Common\System\Net\StreamBuffer.cs" />
</ItemGroup>
<!-- Windows specific files -->
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.UNICODE_STRING.cs"
@@ -316,12 +321,12 @@
<Compile Include="ImpersonatedAuthTests.cs" />
</ItemGroup>
<!-- Linux specific files -->
- <ItemGroup Condition="'$(TargetsLinux)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="$(CommonPath)Interop\Linux\Interop.Libraries.cs"
Link="Common\Interop\Linux\Interop.Libraries.cs" />
</ItemGroup>
<!-- OSX specific files -->
- <ItemGroup Condition=" '$(TargetsOSX)' == 'true' ">
+ <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'OSX' ">
<Compile Include="$(CommonPath)Interop\OSX\Interop.Libraries.cs"
Link="Common\Interop\OSX\Interop.Libraries.cs" />
</ItemGroup>
diff --git a/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj b/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj
index f676e0381bd..0ad988c4e54 100644
--- a/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj
+++ b/src/libraries/System.Net.Http/tests/UnitTests/System.Net.Http.Unit.Tests.csproj
@@ -233,26 +233,26 @@
Link="ProductionCode\System\Net\Http\SocketsHttpHandler\RuntimeSettingParser.cs" />
<Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs"
Link="ProductionCode\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs" />
- <Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Unix.cs" Condition="('$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true') and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))"
+ <Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Unix.cs" Condition="'$(TargetPlatformIdentifier)' != 'windows'"
Link="ProductionCode\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Unix.cs" />
- <Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Windows.cs" Condition=" '$(TargetsWindows)' == 'true' and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))"
+ <Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'"
Link="ProductionCode\System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Windows.cs" />
<Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\HttpUtilities.cs"
Link="ProductionCode\System\Net\Http\SocketsHttpHandler\HttpUtilities.cs" />
<Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.cs"
Link="ProductionCode\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.cs" />
- <Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.OSX.cs" Condition=" ('$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true') and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))"
+ <Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.OSX.cs" Condition=" '$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'"
Link="ProductionCode\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.OSX.cs" />
- <Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Unix.cs" Condition="('$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true') and '$(TargetsOSX)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetstvOS)' != 'true' and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))"
+ <Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Unix.cs" Condition="'$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier)' != 'OSX' and '$(TargetPlatformIdentifier)' != 'iOS' and '$(TargetPlatformIdentifier)' != 'tvOS'"
Link="ProductionCode\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Unix.cs" />
- <Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Windows.cs" Condition=" '$(TargetsWindows)' == 'true' and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))"
+ <Compile Include="..\..\src\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Windows.cs" Condition=" '$(TargetPlatformIdentifier)' == 'windows' "
Link="ProductionCode\System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Windows.cs" />
<Compile Include="$(CommonPath)System\Net\Http\HttpHandlerDefaults.cs"
Link="ProductionCode\System\Net\Http\HttpHandlerDefaults.cs" />
<Compile Include="DigestAuthenticationTests.cs" />
<Compile Include="Fakes\HttpClientHandler.cs" />
<Compile Include="Fakes\HttpTelemetry.cs" />
- <Compile Include="Fakes\MacProxy.cs" Condition=" ('$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true') and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))" />
+ <Compile Include="Fakes\MacProxy.cs" Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'" />
<Compile Include="Headers\AltSvcHeaderParserTest.cs" />
<Compile Include="Headers\AuthenticationHeaderValueTest.cs" />
<Compile Include="Headers\ByteArrayHeaderParserTest.cs" />
diff --git a/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.csproj b/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.csproj
index 00bc53369a0..470e002db23 100644
--- a/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.csproj
+++ b/src/libraries/System.Net.HttpListener/ref/System.Net.HttpListener.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.HttpListener/src/System.Net.HttpListener.csproj b/src/libraries/System.Net.HttpListener/src/System.Net.HttpListener.csproj
index 1da319175f0..f50c50e9eed 100644
--- a/src/libraries/System.Net.HttpListener/src/System.Net.HttpListener.csproj
+++ b/src/libraries/System.Net.HttpListener/src/System.Net.HttpListener.csproj
@@ -4,7 +4,11 @@
<ForceManagedImplementation>false</ForceManagedImplementation>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.SystemNetHttpListener_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ </PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
+ <PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.SystemNetHttpListener_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Principal.Windows\src\System.Security.Principal.Windows.csproj" />
@@ -35,7 +39,7 @@
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Overlapped" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\Net\BoundaryType.cs" />
<Compile Include="System\Net\EntitySendFormat.cs" />
<Compile Include="System\Net\HttpListenerPrefixCollection.cs" />
@@ -87,7 +91,7 @@
<Compile Include="$(CommonPath)System\HexConverter.cs"
Link="Common\System\HexConverter.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(ForceManagedImplementation)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows' and '$(ForceManagedImplementation)' != 'true'">
<Compile Include="System\Net\Windows\HttpListener.Windows.cs" />
<Compile Include="System\Net\Windows\HttpListenerSession.Windows.cs" />
<Compile Include="System\Net\Windows\HttpListenerContext.Windows.cs" />
@@ -251,7 +255,7 @@
<Compile Include="$(CommonPath)Interop\Windows\SspiCli\SSPIWrapper.cs"
Link="Common\Interop\Windows\SspiCli\SSPIWrapper.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' or '$(ForceManagedImplementation)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(ForceManagedImplementation)' == 'true'">
<Compile Include="System\Net\Managed\HttpEndPointListener.cs" />
<Compile Include="System\Net\Managed\HttpEndPointManager.cs" />
<Compile Include="System\Net\Managed\HttpConnection.cs" />
diff --git a/src/libraries/System.Net.Mail/ref/System.Net.Mail.csproj b/src/libraries/System.Net.Mail/ref/System.Net.Mail.csproj
index 99ae2fb8049..119925b1b0e 100644
--- a/src/libraries/System.Net.Mail/ref/System.Net.Mail.csproj
+++ b/src/libraries/System.Net.Mail/ref/System.Net.Mail.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj b/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj
index c80216d012c..d73fe7a77ce 100644
--- a/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj
+++ b/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj
@@ -3,12 +3,12 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
- <DefineConstants Condition="'$(TargetstvOS)' == 'true'">$(DefineConstants);NO_NTAUTHENTICATION</DefineConstants>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.PlatformNotSupported_NetMail</GeneratePlatformNotSupportedAssemblyMessage>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'tvOS'">$(DefineConstants);NO_NTAUTHENTICATION</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\Net\Base64Stream.cs" />
@@ -78,12 +78,12 @@
Link="Common\System\HexConverter.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="System\Net\Mail\SmtpClient.Browser.cs" />
</ItemGroup>
<!-- Non Browser specific files - internal and security -->
- <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetsBrowser)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="System\Net\Mail\SmtpClient.cs" />
<Compile Include="System\Net\Mail\ISmtpAuthenticationModule.cs" />
<Compile Include="System\Net\Mail\SmtpAuthenticationManager.cs" />
@@ -119,7 +119,7 @@
</ItemGroup>
<!-- NT authentication specific files -->
- <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetsBrowser)' != 'true' and '$(TargetstvOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'Browser' and '$(TargetPlatformIdentifier)' != 'tvOS'">
<Compile Include="$(CommonPath)System\Net\ContextFlagsPal.cs"
Link="Common\System\Net\ContextFlagsPal.cs" />
<Compile Include="$(CommonPath)System\Net\NegotiationInfoClass.cs"
@@ -137,13 +137,13 @@
</ItemGroup>
<!-- Unix specific files -->
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'tvOS'">
<Compile Include="$(CommonPath)System\Net\ContextAwareResult.Unix.cs"
Link="Common\System\Net\ContextAwareResult.Unix.cs" />
</ItemGroup>
<!-- Unix specific files (NT Authentication) -->
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' and '$(TargetstvOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs"
@@ -177,7 +177,7 @@
</ItemGroup>
<!-- Windows specific files -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)System\Net\Security\SecurityBuffer.Windows.cs"
Link="Common\System\Net\Security\SecurityBuffer.Windows.cs" />
<Compile Include="$(CommonPath)System\Net\Security\SecurityBufferType.Windows.cs"
diff --git a/src/libraries/System.Net.Mail/tests/Unit/System.Net.Mail.Unit.Tests.csproj b/src/libraries/System.Net.Mail/tests/Unit/System.Net.Mail.Unit.Tests.csproj
index 400d614c0df..6ecf5f0bdd1 100644
--- a/src/libraries/System.Net.Mail/tests/Unit/System.Net.Mail.Unit.Tests.csproj
+++ b/src/libraries/System.Net.Mail/tests/Unit/System.Net.Mail.Unit.Tests.csproj
@@ -19,7 +19,7 @@
<Compile Include="MessageTests\MessageHeaderBehaviorTest.cs" />
<Compile Include="MessageTests\ReplyToListTest.cs" />
<Compile Include="QuotedPrintableStreamTest.cs" />
- <Compile Include="SmtpConnectionTests\EhloParseExtensionsTest.cs" Condition="'$(TargetsBrowser)' != 'true'" />
+ <Compile Include="SmtpConnectionTests\EhloParseExtensionsTest.cs" Condition="'$(TargetPlatformIdentifier)' != 'Browser'" />
<Compile Include="SmtpDateTimeTest.cs" />
<Compile Include="WriteStateInfoTest.cs" />
</ItemGroup>
@@ -148,7 +148,7 @@
Link="Common\System\HexConverter.cs" />
</ItemGroup>
<!-- Unix specific files -->
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="$(CommonPath)System\Net\ContextAwareResult.Unix.cs"
Link="Common\System\Net\ContextAwareResult.Unix.cs" />
<Compile Include="$(CommonPath)System\Net\ContextFlagsAdapterPal.Unix.cs"
@@ -183,7 +183,7 @@
Link="Common\System\Net\Security\Unix\SecChannelBindings.cs" />
</ItemGroup>
<!-- Windows specific files -->
- <ItemGroup Condition="'$(TargetsWindows)'=='true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.BOOL.cs"
Link="Common\Interop\Windows\Interop.BOOL.cs" />
<Compile Include="$(CommonPath)Interop\Windows\SChannel\Interop.SecPkgContext_ApplicationProtocol.cs"
@@ -265,7 +265,7 @@
</ItemGroup>
<!-- Non Browser specific files - internal and security -->
- <ItemGroup Condition="'$(TargetsBrowser)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="..\..\src\System\Net\Mail\SmtpLoginAuthenticationModule.cs"
Link="ProductionCode\SmtpLoginAuthenticationModule.cs" />
<Compile Include="..\..\src\System\Net\Mail\SmtpNegotiateAuthenticationModule.cs"
diff --git a/src/libraries/System.Net.NameResolution/ref/System.Net.NameResolution.csproj b/src/libraries/System.Net.NameResolution/ref/System.Net.NameResolution.csproj
index 8c301a790a4..2dfb078c48a 100644
--- a/src/libraries/System.Net.NameResolution/ref/System.Net.NameResolution.csproj
+++ b/src/libraries/System.Net.NameResolution/ref/System.Net.NameResolution.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.NameResolution/src/System.Net.NameResolution.csproj b/src/libraries/System.Net.NameResolution/src/System.Net.NameResolution.csproj
index 250bc924fbd..31a4fa7072e 100644
--- a/src/libraries/System.Net.NameResolution/src/System.Net.NameResolution.csproj
+++ b/src/libraries/System.Net.NameResolution/src/System.Net.NameResolution.csproj
@@ -8,7 +8,7 @@
<PropertyGroup>
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == 'Browser' or '$(TargetPlatformIdentifier)' == ''">SR.SystemNetNameResolution_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
- <ApiExclusionListPath Condition="'$(TargetsBrowser)' == 'true'">ExcludeApiList.PNSE.Browser.txt</ApiExclusionListPath>
+ <ApiExclusionListPath Condition="'$(TargetPlatformIdentifier)' == 'Browser'">ExcludeApiList.PNSE.Browser.txt</ApiExclusionListPath>
</PropertyGroup>
<ItemGroup Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' == ''">
<Compile Include="System\Net\Dns.cs" />
@@ -36,7 +36,7 @@
<Compile Include="$(CommonPath)System\Net\SocketProtocolSupportPal.cs"
Link="Common\System\Net\SocketProtocolSupportPal.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Net\NameResolutionPal.Windows.cs" />
<!-- Debug only -->
<Compile Include="$(CommonPath)System\Net\DebugSafeHandle.cs"
@@ -76,7 +76,7 @@
<Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.GetAddrInfoExW.cs"
Link="Common\Interop\Windows\WinSock\Interop.GetAddrInfoExW.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="System\Net\NameResolutionPal.Unix.cs" />
<Compile Include="$(CommonPath)System\Net\InteropIPAddressExtensions.Unix.cs"
Link="Common\System\Net\InteropIPAddressExtensions.Unix.cs" />
@@ -109,7 +109,7 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.SocketAddress.cs"
Link="Common\Interop\Unix\System.Native\Interop.SocketAddress.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="System\Net\Dns.Browser.cs" />
</ItemGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.NameResolution/tests/PalTests/System.Net.NameResolution.Pal.Tests.csproj b/src/libraries/System.Net.NameResolution/tests/PalTests/System.Net.NameResolution.Pal.Tests.csproj
index 7adb69687b6..13bdf57acf3 100644
--- a/src/libraries/System.Net.NameResolution/tests/PalTests/System.Net.NameResolution.Pal.Tests.csproj
+++ b/src/libraries/System.Net.NameResolution/tests/PalTests/System.Net.NameResolution.Pal.Tests.csproj
@@ -21,9 +21,9 @@
<Compile Include="Fakes\IPAddressFakeExtensions.cs" />
<Compile Include="$(CommonPath)System\Net\Logging\NetEventSource.Common.cs"
Link="Common\System\Net\Logging\NetEventSource.cs" />
- <Compile Include="$(CommonPath)System\Net\Sockets\ProtocolType.cs" Condition="'$(TargetsWindows)' == 'true'"
+ <Compile Include="$(CommonPath)System\Net\Sockets\ProtocolType.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'"
Link="Common\System\Net\Sockets\ProtocolType.cs" />
- <Compile Include="$(CommonPath)System\Net\Sockets\SocketType.cs" Condition="'$(TargetsWindows)' == 'true'"
+ <Compile Include="$(CommonPath)System\Net\Sockets\SocketType.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'"
Link="Common\System\Net\Sockets\SocketType.cs" />
<Compile Include="$(CommonPath)System\Net\IPEndPointStatics.cs"
Link="Common\System\Net\IPEndPointStatics.cs" />
@@ -36,7 +36,7 @@
<Compile Include="$(CommonTestPath)System\Net\Configuration.Http.cs"
Link="Common\System\Net\Configuration.Http.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true' ">
+ <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows' ">
<Compile Include="..\..\src\System\Net\NameResolutionPal.Windows.cs"
Link="ProductionCode\System\Net\NameResolutionPal.Windows.cs" />
<Compile Include="$(CommonPath)System\Net\InternalException.cs"
@@ -74,7 +74,7 @@
<Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.GetAddrInfoExW.cs"
Link="Common\Interop\Windows\WinSock\Interop.GetAddrInfoExW.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="$(CommonPath)System\Net\SocketAddressPal.Unix.cs"
Link="Common\System\Net\Internals\SocketAddressPal.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Interop.CheckedAccess.cs"
diff --git a/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.csproj b/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.csproj
index 2718a2752d4..f19960917d7 100644
--- a/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.csproj
+++ b/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj b/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj
index 66bcfce21b4..4a0125314b1 100644
--- a/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj
+++ b/src/libraries/System.Net.NetworkInformation/src/System.Net.NetworkInformation.csproj
@@ -4,10 +4,12 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-Solaris;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.SystemNetNetworkInformation_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.SystemNetNetworkInformation_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\Net\NetworkInformation\DuplicateAddressDetectionState.cs" />
<Compile Include="System\Net\NetworkInformation\GatewayIPAddressInformation.cs" />
<Compile Include="System\Net\NetworkInformation\GatewayIPAddressInformationCollection.cs" />
@@ -26,7 +28,7 @@
<Compile Include="System\Net\NetworkInformation\MulticastIPAddressInformationCollection.cs" />
<Compile Include="System\Net\NetworkInformation\NetBiosNodeType.cs" />
<Compile Include="System\Net\NetworkInformation\NetEventSource.NetworkInformation.cs" />
- <Compile Include="System\Net\NetworkInformation\NetworkAddressChange.cs" Condition="'$(Targetsillumos)' != 'true' and '$(TargetsSolaris)' != 'true'" />
+ <Compile Include="System\Net\NetworkInformation\NetworkAddressChange.cs" Condition="'$(TargetPlatformIdentifier)' != 'illumos' and '$(TargetPlatformIdentifier)' != 'Solaris'" />
<Compile Include="System\Net\NetworkInformation\NetworkAvailabilityEventArgs.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkChangeDelegates.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkInterface.cs" />
@@ -52,7 +54,7 @@
<Compile Include="$(CommonPath)System\HexConverter.cs" Link="Common\System\HexConverter.cs" />
<Compile Include="$(CommonPath)System\Threading\Tasks\TaskToApm.cs" Link="Common\System\Threading\Tasks\TaskToApm.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<!-- Logging -->
<Compile Include="$(CommonPath)System\Net\Logging\NetEventSource.Common.cs" Link="Common\System\Net\Logging\NetEventSource.Common.cs" />
<!-- Interop -->
@@ -97,7 +99,7 @@
<Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.WSAIoctl.cs" Link="Common\Interop\Windows\WinSock\Interop.WSAIoctl.cs" />
</ItemGroup>
<!-- Unix -->
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="System\Net\NetworkInformation\IPAddressUtil.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkFiles.cs" />
<Compile Include="System\Net\NetworkInformation\SimpleGatewayIPAddressInformation.Unix.cs" />
@@ -121,7 +123,7 @@
<Compile Include="$(CommonPath)System\IO\RowConfigReader.cs" Link="Common\System\IO\RowConfigReader.cs" />
</ItemGroup>
<!-- Linux (other than Android) -->
- <ItemGroup Condition="'$(TargetsLinux)' == 'true' and '$(TargetsAndroid)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux'">
<Compile Include="System\Net\NetworkInformation\ExceptionHelper.Linux.cs" />
<Compile Include="System\Net\NetworkInformation\LinuxIcmpV4Statistics.cs" />
<Compile Include="System\Net\NetworkInformation\LinuxIcmpV6Statistics.cs" />
@@ -147,7 +149,7 @@
<Compile Include="$(CommonPath)Interop\Linux\Interop.LinuxNetDeviceFlags.cs" Link="Common\Interop\Linux\Interop.LinuxNetDeviceFlags.cs" />
</ItemGroup>
<!-- Android -->
- <ItemGroup Condition="'$(TargetsAndroid)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Android'">
<Compile Include="System\Net\NetworkInformation\IPGlobalPropertiesPal.Android.cs" />
<Compile Include="System\Net\NetworkInformation\AndroidIPGlobalProperties.cs" />
<Compile Include="System\Net\NetworkInformation\AndroidIPGlobalStatistics.cs" />
@@ -158,7 +160,7 @@
<Compile Include="System\Net\NetworkInformation\AndroidNetworkInterface.cs" />
</ItemGroup>
<!-- OSX -->
- <ItemGroup Condition="'$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsFreeBSD)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS' or '$(TargetPlatformIdentifier)' == 'FreeBSD'">
<Compile Include="System\Net\NetworkInformation\IPGlobalPropertiesPal.Bsd.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkInterfacePal.Bsd.cs" />
<Compile Include="System\Net\NetworkInformation\BsdIcmpV4Statistics.cs" />
@@ -177,7 +179,7 @@
<Compile Include="$(CommonPath)Interop\BSD\System.Native\Interop.ProtocolStatistics.cs" Link="Common\Interop\BSD\System.Native\Interop.ProtocolStatistics.cs" />
<Compile Include="$(CommonPath)Interop\BSD\System.Native\Interop.TcpConnectionInfo.cs" Link="Common\Interop\BSD\System.Native\Interop.TcpConnectionInfo.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">
<Compile Include="System\Net\NetworkInformation\NetworkAddressChange.OSX.cs" />
<!-- OSX Common -->
<Compile Include="$(CommonPath)Interop\OSX\Interop.CoreFoundation.cs" Link="Common\Interop\OSX\Interop.CoreFoundation.cs" />
@@ -186,15 +188,15 @@
<Compile Include="$(CommonPath)Interop\OSX\Interop.SystemConfiguration.cs" Link="Common\Interop\OSX\Interop.SystemConfiguration.cs" />
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeCreateHandle.OSX.cs" Link="Common\Microsoft\Win32\SafeHandles\SafeCreateHandle.OSX.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsFreeBSD)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'FreeBSD'">
<Compile Include="$(CommonPath)Interop\FreeBSD\Interop.Libraries.cs" Link="Common\Interop\FreeBSD\Interop.Libraries.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsLinux)' == 'true' or '$(TargetsFreeBSD)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'Android' or '$(TargetPlatformIdentifier)' == 'FreeBSD'">
<Compile Include="System\Net\NetworkInformation\NetworkAddressChange.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.NetworkChange.cs" Link="Common\Interop\Unix\System.Native\Interop.NetworkChange.cs" />
</ItemGroup>
<!-- Unknown Unix -->
- <ItemGroup Condition="'$(TargetsUnknownUnix)' == 'true' or '$(Targetsillumos)' == 'true' or '$(TargetsSolaris)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'UnknownUnix' or '$(TargetPlatformIdentifier)' == 'illumos' or '$(TargetPlatformIdentifier)' == 'Solaris'">
<Compile Include="System\Net\NetworkInformation\IPGlobalPropertiesPal.UnknownUnix.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkInterfacePal.UnknownUnix.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkAddressChange.UnknownUnix.cs" />
@@ -217,11 +219,11 @@
<Reference Include="System.Threading.Overlapped" />
<Reference Include="System.Threading.ThreadPool" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
<Reference Include="System.IO.FileSystem" />
<Reference Include="System.Threading.Thread" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsLinux)' == 'true' or '$(TargetsFreeBSD)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'Android' or '$(TargetPlatformIdentifier)' == 'FreeBSD'">
<Reference Include="System.Threading.Timer" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.Net.Ping/ref/System.Net.Ping.csproj b/src/libraries/System.Net.Ping/ref/System.Net.Ping.csproj
index b91f82444f4..3a766d26314 100644
--- a/src/libraries/System.Net.Ping/ref/System.Net.Ping.csproj
+++ b/src/libraries/System.Net.Ping/ref/System.Net.Ping.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.Ping/src/System.Net.Ping.csproj b/src/libraries/System.Net.Ping/src/System.Net.Ping.csproj
index 206fe170799..076d8bcd974 100644
--- a/src/libraries/System.Net.Ping/src/System.Net.Ping.csproj
+++ b/src/libraries/System.Net.Ping/src/System.Net.Ping.csproj
@@ -4,11 +4,13 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.SystemNetPing_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
- <TargetsApple Condition="'$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">true</TargetsApple>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.SystemNetPing_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <IsApplePlatform Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">true</IsApplePlatform>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\Net\NetworkInformation\IPStatus.cs" />
<Compile Include="System\Net\NetworkInformation\NetEventSource.Ping.cs" />
<Compile Include="System\Net\NetworkInformation\Ping.cs" />
@@ -37,7 +39,7 @@
<Compile Include="$(CommonPath)System\Net\Internals\IPEndPointExtensions.cs"
Link="Common\System\Net\Internals\IPEndPointExtensions.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="('$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows')">
<Compile Include="System\Net\NetworkInformation\IcmpV4MessageConstants.cs" />
<Compile Include="System\Net\NetworkInformation\IcmpV6MessageConstants.cs" />
<Compile Include="System\Net\NetworkInformation\Ping.RawSocket.cs" />
@@ -68,14 +70,14 @@
<Compile Include="$(CommonPath)System\Text\ValueUtf8Converter.cs"
Link="Common\System\Text\ValueUtf8Converter.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' AND '$(TargetsApple)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(IsApplePlatform)' != 'true'">
<Compile Include="System\Net\NetworkInformation\Ping.Unix.cs" />
<Compile Include="System\Net\NetworkInformation\Ping.PingUtility.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' AND '$(TargetsApple)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(IsApplePlatform)' == 'true'">
<Compile Include="System\Net\NetworkInformation\Ping.OSX.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Net\NetworkInformation\Ping.Windows.cs" />
<!-- System.Net Common -->
<Compile Include="$(CommonPath)System\Net\SocketAddressPal.Windows.cs"
@@ -119,7 +121,7 @@
<Reference Include="System.Threading" />
<Reference Include="System.Threading.ThreadPool" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
<Reference Include="System.Collections.Specialized" />
<Reference Include="System.Diagnostics.Process" />
<Reference Include="System.IO.FileSystem" />
diff --git a/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.csproj b/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.csproj
index da2cdd8e41a..a52552a435c 100644
--- a/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.csproj
+++ b/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj b/src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj
index cbb369186fa..3c17ba5634a 100644
--- a/src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj
+++ b/src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj
@@ -87,7 +87,7 @@
<Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.ErrorCodes.cs"
Link="Common\Interop\Windows\WinSock\Interop.ErrorCodes.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Net\SocketException.Windows.cs" />
<Compile Include="$(CommonPath)System\Net\SocketAddressPal.Windows.cs"
Link="Common\System\Net\SocketAddressPal.Windows.cs" />
@@ -110,7 +110,7 @@
<Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.if_nametoindex.cs"
Link="Common\Interop\Windows\IpHlpApi\Interop.if_nametoindex.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="System\Net\SocketException.Unix.cs" />
<Compile Include="$(CommonPath)System\Net\SocketAddressPal.Unix.cs"
Link="Common\System\Net\SocketAddressPal.Unix.cs" />
@@ -125,7 +125,7 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.SocketAddress.cs"
Link="Common\Interop\Unix\System.Native\Interop.SocketAddress.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Unix.cs"
Link="Common\System\Net\NetworkInformation\HostInformationPal.Unix.cs" />
<Compile Include="$(CommonPath)System\Net\NetworkInformation\InterfaceInfoPal.Unix.cs"
@@ -141,7 +141,7 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.InterfaceNameToIndex.cs"
Link="Common\Interop\Unix\System.Native\Interop.InterfaceNameToIndex.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Browser.cs"
Link="Common\System\Net\NetworkInformation\HostInformationPal.Browser.cs" />
<Compile Include="$(CommonPath)System\Net\NetworkInformation\InterfaceInfoPal.Browser.cs"
diff --git a/src/libraries/System.Net.Primitives/tests/PalTests/System.Net.Primitives.Pal.Tests.csproj b/src/libraries/System.Net.Primitives/tests/PalTests/System.Net.Primitives.Pal.Tests.csproj
index fc4e4d4e55f..2f413fd0a91 100644
--- a/src/libraries/System.Net.Primitives/tests/PalTests/System.Net.Primitives.Pal.Tests.csproj
+++ b/src/libraries/System.Net.Primitives/tests/PalTests/System.Net.Primitives.Pal.Tests.csproj
@@ -55,7 +55,7 @@
<Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.ErrorCodes.cs"
Link="ProductionCode\Common\Interop\Windows\WinSock\Interop.ErrorCodes.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true' ">
+ <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows' ">
<Compile Include="..\..\src\System\Net\SocketException.Windows.cs"
Link="ProductionCode\System\Net\SocketException.Windows.cs" />
<Compile Include="$(CommonPath)System\Net\SocketAddressPal.Windows.cs"
@@ -79,7 +79,7 @@
<Compile Include="$(CommonPath)Interop\Windows\IpHlpApi\Interop.if_nametoindex.cs"
Link="ProductionCode\Common\Interop\Windows\IpHlpApi\Interop.if_nametoindex.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="..\..\src\System\Net\SocketException.Unix.cs"
Link="ProductionCode\System\Net\SocketException.Unix.cs" />
<Compile Include="$(CommonPath)System\Net\SocketAddressPal.Unix.cs"
@@ -97,7 +97,7 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.SocketAddress.cs"
Link="ProductionCode\Common\Interop\Unix\System.Native\Interop.SocketAddress.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Unix.cs"
Link="Common\System\Net\NetworkInformation\HostInformationPal.Unix.cs" />
<Compile Include="$(CommonPath)System\Net\NetworkInformation\InterfaceInfoPal.Unix.cs"
@@ -113,7 +113,7 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.InterfaceNameToIndex.cs"
Link="Common\Interop\Unix\System.Native\Interop.InterfaceNameToIndex.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformationPal.Browser.cs"
Link="Common\System\Net\NetworkInformation\HostInformationPal.Browser.cs" />
<Compile Include="$(CommonPath)System\Net\NetworkInformation\InterfaceInfoPal.Browser.cs"
diff --git a/src/libraries/System.Net.Primitives/tests/UnitTests/System.Net.Primitives.UnitTests.Tests.csproj b/src/libraries/System.Net.Primitives/tests/UnitTests/System.Net.Primitives.UnitTests.Tests.csproj
index 4e77239fae9..a070c4488ab 100644
--- a/src/libraries/System.Net.Primitives/tests/UnitTests/System.Net.Primitives.UnitTests.Tests.csproj
+++ b/src/libraries/System.Net.Primitives/tests/UnitTests/System.Net.Primitives.UnitTests.Tests.csproj
@@ -77,7 +77,7 @@
<Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.ErrorCodes.cs"
Link="ProductionCode\Common\Interop\Windows\WinSock\Interop.ErrorCodes.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="..\..\src\System\Net\SocketException.Windows.cs"
Link="ProductionCode\System\Net\SocketException.Unix.cs" />
<Compile Include="$(CommonPath)System\Net\SocketAddressPal.Windows.cs"
@@ -89,7 +89,7 @@
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="ProductionCode\Common\Interop\Windows\Interop.Libraries.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="..\..\src\System\Net\SocketException.Unix.cs"
Link="ProductionCode\System\Net\SocketException.Unix.cs" />
<Compile Include="$(CommonPath)System\Net\NetworkInformation\InterfaceInfoPal.Unix.cs"
diff --git a/src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj b/src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj
index 507e003a13e..1d0cdaed9f8 100644
--- a/src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj
+++ b/src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
</PropertyGroup>
diff --git a/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj b/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj
index 31e56528809..12bcced0a5f 100644
--- a/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj
+++ b/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj
@@ -3,14 +3,15 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
- <DefineConstants Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsOSX)' == 'true'">$(DefineConstants);SOCKADDR_HAS_LENGTH</DefineConstants>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.SystemNetQuic_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'FreeBSD' or '$(TargetPlatformIdentifier)' == 'OSX'">$(DefineConstants);SOCKADDR_HAS_LENGTH</DefineConstants>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.SystemNetQuic_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
<!-- Source files -->
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\Net\Quic\*.cs" />
<Compile Include="System\Net\Quic\Implementations\*.cs" />
<Compile Include="System\Net\Quic\Implementations\Mock\*.cs" />
@@ -30,9 +31,7 @@
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs">
<Link>Common\DisableRuntimeMarshalling.cs</Link>
</Compile>
- </ItemGroup>
- <!-- System.Net common -->
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <!-- System.Net common -->
<Compile Include="$(CommonPath)System\Threading\Tasks\TaskToApm.cs" Link="Common\System\Threading\Tasks\TaskToApm.cs" />
<Compile Include="$(CommonPath)System\Net\ArrayBuffer.cs" Link="Common\System\Net\ArrayBuffer.cs" />
<Compile Include="$(CommonPath)System\Net\MultiArrayBuffer.cs" Link="Common\System\Net\MultiArrayBuffer.cs" />
@@ -40,7 +39,7 @@
<Compile Include="$(CommonPath)System\Net\StreamBuffer.cs" Link="Common\System\Net\StreamBuffer.cs" />
</ItemGroup>
<!-- Windows specific files -->
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs" Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CERT_CONTEXT.cs" Link="Common\Interop\Windows\Crypt32\Interop.CERT_CONTEXT.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CERT_INFO.cs" Link="Common\Interop\Windows\Crypt32\Interop.CERT_INFO.cs" />
@@ -56,7 +55,7 @@
<Compile Include="System\Net\Quic\Implementations\MsQuic\Interop\MsQuicStatusCodes.Windows.cs" />
</ItemGroup>
<!-- Unix (OSX + Linux) specific files -->
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'FreeBSD'">
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs" Link="Common\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs" Link="Common\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Security.Cryptography.Native\Interop.BIO.cs" Link="Common\Interop\Unix\System.Security.Cryptography.Native\Interop.BIO.cs" />
@@ -82,20 +81,20 @@
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeHandleCache.cs" Link="Common\Microsoft\Win32\SafeHandles\SafeHandleCache.cs" />
</ItemGroup>
<!-- Linux specific files -->
- <ItemGroup Condition="'$(TargetsLinux)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux'">
<Compile Include="$(CommonPath)Interop\Linux\Interop.Libraries.cs" Link="Common\Interop\Linux\Interop.Libraries.cs" />
<Compile Include="System\Net\Quic\Implementations\MsQuic\Interop\MsQuicStatusCodes.Linux.cs" />
<Compile Include="$(CommonPath)System\Net\Security\CertificateValidation.Unix.cs" Link="Common\System\Net\Security\CertificateValidation.Unix.cs" />
</ItemGroup>
<!-- FreeBSD specific files -->
- <ItemGroup Condition="'$(TargetsFreeBSD)' == 'true' ">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'FreeBSD' ">
<Compile Include="$(CommonPath)System\Net\Security\CertificateValidation.Unix.cs" Link="Common\System\Net\Security\CertificateValidation.Unix.cs" />
<Compile Include="$(CommonPath)Interop\FreeBSD\Interop.Libraries.cs" Link="Common\Interop\FreeBSD\Interop.Libraries.cs" />
<!-- Assume similarity with OSX for now -->
<Compile Include="System\Net\Quic\Implementations\MsQuic\Interop\MsQuicStatusCodes.OSX.cs" />
</ItemGroup>
<!-- OSX specific files -->
- <ItemGroup Condition=" '$(TargetsOSX)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX'">
<Compile Include="$(CommonPath)System\Net\Security\CertificateValidation.OSX.cs" Link="Common\System\Net\Security\CertificateValidation.OSX.cs" />
<Compile Include="$(CommonPath)Interop\OSX\Interop.Libraries.cs" Link="Common\Interop\OSX\Interop.Libraries.cs" />
<Compile Include="System\Net\Quic\Implementations\MsQuic\Interop\MsQuicStatusCodes.OSX.cs" />
@@ -130,13 +129,13 @@
<Reference Include="System.Threading.Channels" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Linux' or '$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'FreeBSD'">
<Reference Include="System.Diagnostics.StackTrace" Condition="'$(Configuration)' == 'Debug'" />
<Reference Include="System.Security.Cryptography.OpenSsl" />
</ItemGroup>
<!-- Support for deploying msquic -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows' and
('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'x86') and '$(DotNetBuildFromSource)' != 'true'">
<BinPlaceDir Include="$(MicrosoftNetCoreAppRuntimePackNativeDir)" ItemName="NativeBinPlaceItem" />
<BinPlaceDir Include="$(NetCoreAppCurrentTestHostSharedFrameworkPath)" ItemName="NativeBinPlaceItem" />
diff --git a/src/libraries/System.Net.Requests/ref/System.Net.Requests.csproj b/src/libraries/System.Net.Requests/ref/System.Net.Requests.csproj
index 78b1a6fa04b..36d4f9a3d03 100644
--- a/src/libraries/System.Net.Requests/ref/System.Net.Requests.csproj
+++ b/src/libraries/System.Net.Requests/ref/System.Net.Requests.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<!-- SYSLIB0014: WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. -->
<NoWarn>$(NoWarn);CS0809;SYSLIB0014</NoWarn>
<Nullable>enable</Nullable>
diff --git a/src/libraries/System.Net.Requests/src/System.Net.Requests.csproj b/src/libraries/System.Net.Requests/src/System.Net.Requests.csproj
index fabcc644d97..d2c9530d5f6 100644
--- a/src/libraries/System.Net.Requests/src/System.Net.Requests.csproj
+++ b/src/libraries/System.Net.Requests/src/System.Net.Requests.csproj
@@ -78,20 +78,19 @@
<Compile Include="$(CommonPath)System\Threading\Tasks\TaskToApm.cs"
Link="Common\System\Threading\Tasks\TaskToApm.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\WinInet\Interop.wininet_errors.cs"
Link="Common\Interop\Windows\WinInet\Interop.wininet_errors.cs" />
<Compile Include="$(CommonPath)System\Net\ContextAwareResult.Windows.cs"
Link="Common\System\Net\ContextAwareResult.Windows.cs" />
<Compile Include="System\Net\WebExceptionPal.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="$(CommonPath)System\Net\ContextAwareResult.Unix.cs"
Link="Common\System\Net\ContextAwareResult.Unix.cs" />
<Compile Include="System\Net\WebExceptionPal.Unix.cs" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Principal.Windows\src\System.Security.Principal.Windows.csproj" />
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Collections" />
<Reference Include="System.Collections.NonGeneric" />
@@ -110,6 +109,7 @@
<Reference Include="System.Security.Claims" />
<Reference Include="System.Security.Cryptography" />
<Reference Include="System.Security.Principal" />
+ <Reference Include="System.Security.Principal.Windows" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Thread" />
</ItemGroup>
diff --git a/src/libraries/System.Net.Security/ref/System.Net.Security.csproj b/src/libraries/System.Net.Security/ref/System.Net.Security.csproj
index f5519a69b60..9c747a8b91e 100644
--- a/src/libraries/System.Net.Security/ref/System.Net.Security.csproj
+++ b/src/libraries/System.Net.Security/ref/System.Net.Security.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.Security/src/System.Net.Security.csproj b/src/libraries/System.Net.Security/src/System.Net.Security.csproj
index a71d01bc0b7..b33246299b9 100644
--- a/src/libraries/System.Net.Security/src/System.Net.Security.csproj
+++ b/src/libraries/System.Net.Security/src/System.Net.Security.csproj
@@ -4,20 +4,18 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)</TargetFrameworks>
<!-- This is needed so that code for TlsCipherSuite will have no namespace (causes compile errors) when used within T4 template -->
<DefineConstants>$(DefineConstants);PRODUCT</DefineConstants>
- <DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants);TARGET_WINDOWS</DefineConstants>
<Nullable>enable</Nullable>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.SystemNetSecurity_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.SystemNetSecurity_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'windows'">$(DefineConstants);TARGET_WINDOWS</DefineConstants>
+ <UseAndroidCrypto Condition="'$(TargetPlatformIdentifier)' == 'Android'">true</UseAndroidCrypto>
+ <UseAppleCrypto Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">true</UseAppleCrypto>
+ <DefineConstants Condition="'$(UseAndroidCrypto)' == 'true' or '$(UseAppleCrypto)' == 'true'">$(DefineConstants);SYSNETSECURITY_NO_OPENSSL</DefineConstants>
</PropertyGroup>
- <PropertyGroup>
- <UseAndroidCrypto Condition="'$(TargetsAndroid)' == 'true'">true</UseAndroidCrypto>
- <UseAppleCrypto Condition="'$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">true</UseAppleCrypto>
- </PropertyGroup>
- <PropertyGroup Condition="'$(UseAndroidCrypto)' == 'true' or '$(UseAppleCrypto)' == 'true'">
- <DefineConstants>$(DefineConstants);SYSNETSECURITY_NO_OPENSSL</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\Net\CertificateValidationPal.cs" />
<Compile Include="System\Net\Logging\NetEventSource.cs" />
<Compile Include="System\Net\SslStreamContext.cs" />
@@ -100,7 +98,7 @@
<!-- This file depends on IANA registry. We do not want anyone's build to break after the update -->
<!-- or if they don't have internet connection - explicit opt-in required -->
<!-- To expose newly generated APIs, generated file have to be deliberately copied -->
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\Net\Security\TlsCipherSuite.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
@@ -108,14 +106,14 @@
</Compile>
<None Include="System\Net\Security\TlsCipherSuiteNameParser.ttinclude" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="System\Net\Security\TlsCipherSuiteData.Lookup.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>TlsCipherSuiteData.Lookup.tt</DependentUpon>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<None Include="System\Net\Security\TlsCipherSuiteData.Lookup.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
@@ -136,7 +134,7 @@
<None Include="System\Net\Security\TlsCipherSuite.tt" />
<None Include="System\Net\Security\TlsCipherSuiteData.Lookup.tt" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Net\CertificateValidationPal.Windows.cs" />
<Compile Include="System\Net\Security\CipherSuitesPolicyPal.Windows.cs" />
<Compile Include="System\Net\Security\NegotiateStreamPal.Windows.cs" />
@@ -240,7 +238,7 @@
<Compile Include="$(CommonPath)Interop\Windows\SspiCli\SecPkgContext_StreamSizes.cs"
Link="Common\Interop\Windows\SspiCli\SecPkgContext_StreamSizes.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Errors.cs"
@@ -262,7 +260,7 @@
<Compile Include="System\Net\Security\SslConnectionInfo.Unix.cs" />
<Compile Include="System\Net\Security\TlsCipherSuiteData.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' and '$(TargetstvOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier)' != 'tvOS'">
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\GssSafeHandles.cs"
Link="Common\Microsoft\Win32\SafeHandles\GssSafeHandles.cs" />
<Compile Include="$(CommonPath)System\Net\Security\Unix\SafeDeleteNegoContext.cs"
@@ -285,7 +283,7 @@
Link="Common\System\Net\Security\NegotiateStreamPal.Unix.cs" />
<Compile Include="System\Net\Security\NegotiateStreamPal.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetstvOS)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'tvOS'">
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\GssSafeHandles.PlatformNotSupported.cs"
Link="Common\Microsoft\Win32\SafeHandles\GssSafeHandles.PlatformNotSupported.cs" />
<Compile Include="$(CommonPath)System\Net\ContextFlagsAdapterPal.PlatformNotSupported.cs"
@@ -294,7 +292,7 @@
Link="Common\System\Net\Security\NegotiateStreamPal.PlatformNotSupported.cs" />
<Compile Include="System\Net\Security\NegotiateStreamPal.PlatformNotSupported.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' and '$(UseAndroidCrypto)' != 'true' and '$(UseAppleCrypto)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(UseAndroidCrypto)' != 'true' and '$(UseAppleCrypto)' != 'true'">
<Compile Include="System\Net\CertificateValidationPal.Unix.cs" />
<Compile Include="System\Net\Security\CipherSuitesPolicyPal.Linux.cs" />
<Compile Include="System\Net\Security\SslStreamPal.Unix.cs" />
@@ -433,7 +431,7 @@
<Reference Include="System.Threading" />
<Reference Include="System.Threading.ThreadPool" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
<Reference Include="System.Diagnostics.StackTrace" />
<Reference Include="System.Security.Cryptography.Algorithms" />
<Reference Include="System.Security.Cryptography" />
diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj b/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj
index 72ef0e0c581..8f2d6f40e17 100644
--- a/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj
+++ b/src/libraries/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj
@@ -10,7 +10,7 @@
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsBrowser)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="DummyTcpServer.cs" />
<Compile Include="SslStreamExtensions.cs" />
<Compile Include="TestConfiguration.cs" />
@@ -107,18 +107,18 @@
<Compile Include="SslStreamCredentialCacheTest.cs" />
<Compile Include="SslStreamSystemDefaultsTest.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsBrowser)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="TelemetryTest.cs" />
<Compile Include="LoggingTest.cs" />
<Compile Include="$(CommonTestPath)System\Diagnostics\Tracing\TestEventListener.cs"
Link="Common\System\Diagnostics\Tracing\TestEventListener.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="IdentityValidator.Windows.cs" />
<Compile Include="$(CommonTestPath)System\Net\Capability.Security.Windows.cs"
Link="Common\System\Net\Capability.Security.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="IdentityValidator.Unix.cs" />
<Compile Include="$(CommonTestPath)System\Net\Capability.Security.Unix.cs"
Link="Common\System\Net\Capability.Security.Unix.cs" />
diff --git a/src/libraries/System.Net.Security/tests/UnitTests/System.Net.Security.Unit.Tests.csproj b/src/libraries/System.Net.Security/tests/UnitTests/System.Net.Security.Unit.Tests.csproj
index 46056c9b64f..0fd7b6b55f4 100644
--- a/src/libraries/System.Net.Security/tests/UnitTests/System.Net.Security.Unit.Tests.csproj
+++ b/src/libraries/System.Net.Security/tests/UnitTests/System.Net.Security.Unit.Tests.csproj
@@ -17,11 +17,11 @@
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAndroid)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Android'">
<Compile Include="MD4Tests.cs" />
<Compile Include="..\..\src\System\Net\Security\MD4.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsBrowser)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="SslApplicationProtocolTests.cs" />
<Compile Include="SslAuthenticationOptionsTests.cs" />
<Compile Include="SslStreamAllowedProtocolsTest.cs" />
@@ -38,7 +38,7 @@
<Compile Include="$(CommonPath)System\HexConverter.cs"
Link="Common\System\HexConverter.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsBrowser)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'Browser'">
<!-- Production code references -->
<Compile Include="..\..\src\System\Net\Security\NetEventSource.Security.cs"
Link="ProductionCode\System\Net\Security\NetEventSource.Security.cs" />
diff --git a/src/libraries/System.Net.ServicePoint/ref/System.Net.ServicePoint.csproj b/src/libraries/System.Net.ServicePoint/ref/System.Net.ServicePoint.csproj
index 8041ebea6f8..a7b78ca9eca 100644
--- a/src/libraries/System.Net.ServicePoint/ref/System.Net.ServicePoint.csproj
+++ b/src/libraries/System.Net.ServicePoint/ref/System.Net.ServicePoint.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.ServicePoint/src/System.Net.ServicePoint.csproj b/src/libraries/System.Net.ServicePoint/src/System.Net.ServicePoint.csproj
index b67c9ae2f0d..659e23ec47d 100644
--- a/src/libraries/System.Net.ServicePoint/src/System.Net.ServicePoint.csproj
+++ b/src/libraries/System.Net.ServicePoint/src/System.Net.ServicePoint.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
diff --git a/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.csproj b/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.csproj
index 9387aa99419..0ca0235e6ca 100644
--- a/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.csproj
+++ b/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.Sockets/src/System.Net.Sockets.csproj b/src/libraries/System.Net.Sockets/src/System.Net.Sockets.csproj
index a437542c5ff..4f2f27f215d 100644
--- a/src/libraries/System.Net.Sockets/src/System.Net.Sockets.csproj
+++ b/src/libraries/System.Net.Sockets/src/System.Net.Sockets.csproj
@@ -4,15 +4,17 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.SystemNetSockets_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.SystemNetSockets_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
<PropertyGroup>
<!-- SYSTEM_NET_SOCKETS_DLL is required to allow source-level code sharing for types defined within the
System.Net.Internals namespace. -->
<DefineConstants>$(DefineConstants);SYSTEM_NET_SOCKETS_DLL</DefineConstants>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<!-- All configurations -->
<Compile Include="System\Net\Sockets\SocketReceiveFromResult.cs" />
<Compile Include="System\Net\Sockets\SocketReceiveMessageFromResult.cs" />
@@ -86,7 +88,7 @@
<Compile Include="$(CommonPath)System\Net\Sockets\SocketType.cs"
Link="Common\System\Net\Sockets\SocketType.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<!-- Windows: CoreCLR -->
<Compile Include="System\Net\Sockets\DynamicWinsockMethods.cs" />
<Compile Include="System\Net\Sockets\SafeSocketHandle.Windows.cs" />
@@ -177,7 +179,7 @@
<Compile Include="$(CommonPath)System\Net\CompletionPortHelper.Windows.cs"
Link="Common\System\Net\CompletionPortHelper.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Compile Include="System\Net\Sockets\SafeSocketHandle.Unix.cs" />
<Compile Include="System\Net\Sockets\Socket.Unix.cs" />
<Compile Include="System\Net\Sockets\SocketAsyncContext.Unix.cs" />
@@ -297,7 +299,7 @@
<Reference Include="System.Threading.Overlapped" />
<Reference Include="System.Threading.ThreadPool" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix'">
<Reference Include="System.Threading.Thread" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj b/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj
index 63e0987f7ac..1d3155798c4 100644
--- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj
+++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj
@@ -19,7 +19,7 @@
<Compile Include="DnsEndPointTest.cs" />
<Compile Include="DualModeSocketTest.cs" />
<Compile Include="ExecutionContextFlowTest.cs" />
- <Compile Include="InlineCompletions.Unix.cs" Condition="'$(TargetsUnix)' == 'true'"/>
+ <Compile Include="InlineCompletions.Unix.cs" Condition="'$(TargetPlatformIdentifier)' == 'Unix'"/>
<Compile Include="IPPacketInformationTest.cs" />
<Compile Include="KeepAliveTest.cs" />
<Compile Include="LingerStateTest.cs" />
diff --git a/src/libraries/System.Net.WebClient/ref/System.Net.WebClient.csproj b/src/libraries/System.Net.WebClient/ref/System.Net.WebClient.csproj
index 9174f984584..732d3211ae5 100644
--- a/src/libraries/System.Net.WebClient/ref/System.Net.WebClient.csproj
+++ b/src/libraries/System.Net.WebClient/ref/System.Net.WebClient.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.WebClient/src/System.Net.WebClient.csproj b/src/libraries/System.Net.WebClient/src/System.Net.WebClient.csproj
index 48a1a9c8253..c317fabee22 100644
--- a/src/libraries/System.Net.WebClient/src/System.Net.WebClient.csproj
+++ b/src/libraries/System.Net.WebClient/src/System.Net.WebClient.csproj
@@ -5,9 +5,10 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsBrowser)' == 'true'">SR.SystemNetWebClient_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == 'Browser'">SR.SystemNetWebClient_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsBrowser)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="System\Net\WebClient.cs" />
<Compile Include="$(CommonPath)System\IO\DelegatingStream.cs"
Link="Common\System\IO\DelegatingStream.cs" />
diff --git a/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.csproj b/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.csproj
index f0726067311..6c776532e36 100644
--- a/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.csproj
+++ b/src/libraries/System.Net.WebHeaderCollection/ref/System.Net.WebHeaderCollection.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
<!-- Nullability of parameter 'name' doesn't match overridden member -->
<NoWarn>$(NoWarn);CS8765</NoWarn>
diff --git a/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj b/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj
index d52760c4c64..ccec383b56f 100644
--- a/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj
+++ b/src/libraries/System.Net.WebHeaderCollection/src/System.Net.WebHeaderCollection.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.csproj b/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.csproj
index 43de7648955..7fe0be4f8c5 100644
--- a/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.csproj
+++ b/src/libraries/System.Net.WebProxy/ref/System.Net.WebProxy.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.WebProxy/src/System.Net.WebProxy.csproj b/src/libraries/System.Net.WebProxy/src/System.Net.WebProxy.csproj
index 5fd9532a47b..e77de26b82c 100644
--- a/src/libraries/System.Net.WebProxy/src/System.Net.WebProxy.csproj
+++ b/src/libraries/System.Net.WebProxy/src/System.Net.WebProxy.csproj
@@ -7,8 +7,8 @@
<ItemGroup>
<Compile Include="System\Net\IWebProxyScript.cs" />
<Compile Include="System\Net\WebProxy.cs" />
- <Compile Condition="'$(TargetsBrowser)' == 'true'" Include="System\Net\WebProxy.Browser.cs" />
- <Compile Condition="'$(TargetsBrowser)' != 'true'" Include="System\Net\WebProxy.NonBrowser.cs" />
+ <Compile Condition="'$(TargetPlatformIdentifier)' == 'Browser'" Include="System\Net\WebProxy.Browser.cs" />
+ <Compile Condition="'$(TargetPlatformIdentifier)' != 'Browser'" Include="System\Net\WebProxy.NonBrowser.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Net.NameResolution" />
diff --git a/src/libraries/System.Net.WebSockets.Client/ref/System.Net.WebSockets.Client.csproj b/src/libraries/System.Net.WebSockets.Client/ref/System.Net.WebSockets.Client.csproj
index 7f5666d3064..7793983c080 100644
--- a/src/libraries/System.Net.WebSockets.Client/ref/System.Net.WebSockets.Client.csproj
+++ b/src/libraries/System.Net.WebSockets.Client/ref/System.Net.WebSockets.Client.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj b/src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj
index 946ab8f773b..79fdea54f1f 100644
--- a/src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj
+++ b/src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj
@@ -7,15 +7,15 @@
<ItemGroup>
<Compile Include="System\Net\WebSockets\ClientWebSocket.cs" />
<Compile Include="System\Net\WebSockets\ClientWebSocketDeflateConstants.cs" />
- <Compile Include="System\Net\WebSockets\ClientWebSocketOptions.cs" Condition="'$(TargetsBrowser)' != 'true'" />
+ <Compile Include="System\Net\WebSockets\ClientWebSocketOptions.cs" Condition="'$(TargetPlatformIdentifier)' != 'Browser'" />
<Compile Include="$(CommonPath)System\Net\UriScheme.cs" Link="Common\System\Net\UriScheme.cs" />
<Compile Include="$(CommonPath)System\Net\WebSockets\WebSocketValidate.cs" Link="Common\System\Net\WebSockets\WebSocketValidate.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsBrowser)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="$(CommonPath)System\Net\HttpKnownHeaderNames.cs" Link="Common\System\Net\HttpKnownHeaderNames.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="System\Net\WebSockets\WebSocketHandle.Browser.cs" />
<Compile Include="System\Net\WebSockets\BrowserWebSockets\BrowserWebSocket.cs" />
<Compile Include="System\Net\WebSockets\BrowserWebSockets\ClientWebSocketOptions.cs" />
@@ -36,10 +36,10 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Security.Cryptography" />
<Reference Include="System.Security.Cryptography.Algorithms" />
- <Reference Include="System.Threading.Channels" Condition="'$(TargetsBrowser)' == 'true'" />
+ <Reference Include="System.Threading.Channels" Condition="'$(TargetPlatformIdentifier)' == 'Browser'" />
<Reference Include="System.Memory" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="$(LibrariesProjectRoot)System.Private.Runtime.InteropServices.JavaScript\src\System.Private.Runtime.InteropServices.JavaScript.csproj" Condition="'$(TargetsBrowser)' == 'true'" />
+ <ProjectReference Include="$(LibrariesProjectRoot)System.Private.Runtime.InteropServices.JavaScript\src\System.Private.Runtime.InteropServices.JavaScript.csproj" Condition="'$(TargetPlatformIdentifier)' == 'Browser'" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.csproj b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.csproj
index 134ea19cd36..3f0cf3c8211 100644
--- a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.csproj
+++ b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj b/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj
index 9f2c2cc09cd..f19710a0660 100644
--- a/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj
+++ b/src/libraries/System.Net.WebSockets/src/System.Net.WebSockets.csproj
@@ -36,12 +36,12 @@
Link="Common\Interop\Interop.zlib.cs" />
</ItemGroup>
<!-- Windows specific files -->
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
</ItemGroup>
<!-- Unix specific files -->
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true' ">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser' ">
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
</ItemGroup>
diff --git a/src/libraries/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj b/src/libraries/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj
index 42ba04da8db..05a66d76511 100644
--- a/src/libraries/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj
+++ b/src/libraries/System.Numerics.Vectors/ref/System.Numerics.Vectors.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj b/src/libraries/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj
+++ b/src/libraries/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ObjectModel/ref/System.ObjectModel.csproj b/src/libraries/System.ObjectModel/ref/System.ObjectModel.csproj
index 623c85ec556..76645a7f2ed 100644
--- a/src/libraries/System.ObjectModel/ref/System.ObjectModel.csproj
+++ b/src/libraries/System.ObjectModel/ref/System.ObjectModel.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ObjectModel/src/System.ObjectModel.csproj b/src/libraries/System.ObjectModel/src/System.ObjectModel.csproj
index ecf4f2a77fe..58f389a2659 100644
--- a/src/libraries/System.ObjectModel/src/System.ObjectModel.csproj
+++ b/src/libraries/System.ObjectModel/src/System.ObjectModel.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj b/src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj
index 57474c6e246..1e407a2091b 100644
--- a/src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj
+++ b/src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<NoWarn>$(NoWarn);1634;1691;649</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<!-- Too much private reflection. Do not bother with trimming -->
<ILLinkTrimAssembly>false</ILLinkTrimAssembly>
<Nullable>enable</Nullable>
diff --git a/src/libraries/System.Private.Uri/src/System.Private.Uri.csproj b/src/libraries/System.Private.Uri/src/System.Private.Uri.csproj
index ce5a97d8705..7e19a856a10 100644
--- a/src/libraries/System.Private.Uri/src/System.Private.Uri.csproj
+++ b/src/libraries/System.Private.Uri/src/System.Private.Uri.csproj
@@ -37,10 +37,10 @@
<Compile Include="$(CommonPath)System\Text\ValueStringBuilder.cs" Link="Common\System\Text\ValueStringBuilder.cs" />
<Compile Include="System\ValueStringBuilderExtensions.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Uri.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == ''">
<Compile Include="System\Uri.Unix.cs" />
</ItemGroup>
<ItemGroup>
diff --git a/src/libraries/System.Private.Xml.Linq/src/System.Private.Xml.Linq.csproj b/src/libraries/System.Private.Xml.Linq/src/System.Private.Xml.Linq.csproj
index a174b927459..7c5de0f140e 100644
--- a/src/libraries/System.Private.Xml.Linq/src/System.Private.Xml.Linq.csproj
+++ b/src/libraries/System.Private.Xml.Linq/src/System.Private.Xml.Linq.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>System.Xml</RootNamespace>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj b/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj
index 613e07f835e..091753a1dbb 100644
--- a/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj
+++ b/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj
@@ -779,10 +779,10 @@
<Compile Include="System\Xml\Core\LocalAppContextSwitches.cs" />
<Compile Include="$(CommonPath)System\CSharpHelpers.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)'=='true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Xml\Xsl\Runtime\XmlCollation.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAnyOS)'=='true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == ''">
<Compile Include="System\Xml\Xsl\Runtime\XmlCollation.Unix.cs" />
<Compile Include="System\Xml\Core\XmlTextReaderImpl.Unix.cs" />
</ItemGroup>
diff --git a/src/libraries/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.csproj b/src/libraries/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.csproj
index 2759e12af12..6039cbc7d5e 100644
--- a/src/libraries/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.csproj
+++ b/src/libraries/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection.DispatchProxy/src/System.Reflection.DispatchProxy.csproj b/src/libraries/System.Reflection.DispatchProxy/src/System.Reflection.DispatchProxy.csproj
index babd7f14e4e..4fd66210d47 100644
--- a/src/libraries/System.Reflection.DispatchProxy/src/System.Reflection.DispatchProxy.csproj
+++ b/src/libraries/System.Reflection.DispatchProxy/src/System.Reflection.DispatchProxy.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection.Emit.ILGeneration/ref/System.Reflection.Emit.ILGeneration.csproj b/src/libraries/System.Reflection.Emit.ILGeneration/ref/System.Reflection.Emit.ILGeneration.csproj
index 48837d6105f..709b299efec 100644
--- a/src/libraries/System.Reflection.Emit.ILGeneration/ref/System.Reflection.Emit.ILGeneration.csproj
+++ b/src/libraries/System.Reflection.Emit.ILGeneration/ref/System.Reflection.Emit.ILGeneration.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection.Emit.ILGeneration/src/System.Reflection.Emit.ILGeneration.csproj b/src/libraries/System.Reflection.Emit.ILGeneration/src/System.Reflection.Emit.ILGeneration.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Reflection.Emit.ILGeneration/src/System.Reflection.Emit.ILGeneration.csproj
+++ b/src/libraries/System.Reflection.Emit.ILGeneration/src/System.Reflection.Emit.ILGeneration.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection.Emit.Lightweight/ref/System.Reflection.Emit.Lightweight.csproj b/src/libraries/System.Reflection.Emit.Lightweight/ref/System.Reflection.Emit.Lightweight.csproj
index f5ee53a8ae0..5c26ae3990a 100644
--- a/src/libraries/System.Reflection.Emit.Lightweight/ref/System.Reflection.Emit.Lightweight.csproj
+++ b/src/libraries/System.Reflection.Emit.Lightweight/ref/System.Reflection.Emit.Lightweight.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
</PropertyGroup>
diff --git a/src/libraries/System.Reflection.Emit.Lightweight/src/System.Reflection.Emit.Lightweight.csproj b/src/libraries/System.Reflection.Emit.Lightweight/src/System.Reflection.Emit.Lightweight.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Reflection.Emit.Lightweight/src/System.Reflection.Emit.Lightweight.csproj
+++ b/src/libraries/System.Reflection.Emit.Lightweight/src/System.Reflection.Emit.Lightweight.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection.Emit/ref/System.Reflection.Emit.csproj b/src/libraries/System.Reflection.Emit/ref/System.Reflection.Emit.csproj
index be3da7e1429..69f55b0c9a6 100644
--- a/src/libraries/System.Reflection.Emit/ref/System.Reflection.Emit.csproj
+++ b/src/libraries/System.Reflection.Emit/ref/System.Reflection.Emit.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection.Emit/src/System.Reflection.Emit.csproj b/src/libraries/System.Reflection.Emit/src/System.Reflection.Emit.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Reflection.Emit/src/System.Reflection.Emit.csproj
+++ b/src/libraries/System.Reflection.Emit/src/System.Reflection.Emit.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection.Extensions/ref/System.Reflection.Extensions.csproj b/src/libraries/System.Reflection.Extensions/ref/System.Reflection.Extensions.csproj
index ac1351c0752..fc9bd6eb7bd 100644
--- a/src/libraries/System.Reflection.Extensions/ref/System.Reflection.Extensions.csproj
+++ b/src/libraries/System.Reflection.Extensions/ref/System.Reflection.Extensions.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection.Extensions/src/System.Reflection.Extensions.csproj b/src/libraries/System.Reflection.Extensions/src/System.Reflection.Extensions.csproj
index 94d0c640130..36c7cb1bdde 100644
--- a/src/libraries/System.Reflection.Extensions/src/System.Reflection.Extensions.csproj
+++ b/src/libraries/System.Reflection.Extensions/src/System.Reflection.Extensions.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection.Primitives/ref/System.Reflection.Primitives.csproj b/src/libraries/System.Reflection.Primitives/ref/System.Reflection.Primitives.csproj
index 9d2d488b8cc..2902a67fdf0 100644
--- a/src/libraries/System.Reflection.Primitives/ref/System.Reflection.Primitives.csproj
+++ b/src/libraries/System.Reflection.Primitives/ref/System.Reflection.Primitives.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection.Primitives/src/System.Reflection.Primitives.csproj b/src/libraries/System.Reflection.Primitives/src/System.Reflection.Primitives.csproj
index dd3dc2940a5..5ecfe239de6 100644
--- a/src/libraries/System.Reflection.Primitives/src/System.Reflection.Primitives.csproj
+++ b/src/libraries/System.Reflection.Primitives/src/System.Reflection.Primitives.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection.TypeExtensions/ref/System.Reflection.TypeExtensions.csproj b/src/libraries/System.Reflection.TypeExtensions/ref/System.Reflection.TypeExtensions.csproj
index 5463928fbaf..b2a838b7f81 100644
--- a/src/libraries/System.Reflection.TypeExtensions/ref/System.Reflection.TypeExtensions.csproj
+++ b/src/libraries/System.Reflection.TypeExtensions/ref/System.Reflection.TypeExtensions.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Reflection.TypeExtensions.cs" />
diff --git a/src/libraries/System.Reflection.TypeExtensions/src/System.Reflection.TypeExtensions.csproj b/src/libraries/System.Reflection.TypeExtensions/src/System.Reflection.TypeExtensions.csproj
index e078dd282eb..e000ddd696c 100644
--- a/src/libraries/System.Reflection.TypeExtensions/src/System.Reflection.TypeExtensions.csproj
+++ b/src/libraries/System.Reflection.TypeExtensions/src/System.Reflection.TypeExtensions.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Reflection\TypeExtensions.cs" />
diff --git a/src/libraries/System.Reflection/ref/System.Reflection.csproj b/src/libraries/System.Reflection/ref/System.Reflection.csproj
index 61b26cc370d..721d268bc56 100644
--- a/src/libraries/System.Reflection/ref/System.Reflection.csproj
+++ b/src/libraries/System.Reflection/ref/System.Reflection.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Reflection/src/System.Reflection.csproj b/src/libraries/System.Reflection/src/System.Reflection.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Reflection/src/System.Reflection.csproj
+++ b/src/libraries/System.Reflection/src/System.Reflection.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj b/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj
index dc2bb32692e..ad289dc6319 100644
--- a/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj
+++ b/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj
@@ -20,7 +20,7 @@
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Drawing.Common\src\System.Drawing.Common.csproj" />
- <ProjectReference Include="$(LibrariesProjectRoot)System.Windows.Extensions\src\System.Windows.Extensions.csproj" Condition="'$(TargetsWindows)' == 'true'" />
+ <ProjectReference Include="$(LibrariesProjectRoot)System.Windows.Extensions\src\System.Windows.Extensions.csproj" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTupleVersion)" />
diff --git a/src/libraries/System.Resources.Reader/ref/System.Resources.Reader.csproj b/src/libraries/System.Resources.Reader/ref/System.Resources.Reader.csproj
index a58632790d7..ac31c124d77 100644
--- a/src/libraries/System.Resources.Reader/ref/System.Resources.Reader.csproj
+++ b/src/libraries/System.Resources.Reader/ref/System.Resources.Reader.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Resources.Reader/src/System.Resources.Reader.csproj b/src/libraries/System.Resources.Reader/src/System.Resources.Reader.csproj
index 81ff3cda55d..1a509db46e8 100644
--- a/src/libraries/System.Resources.Reader/src/System.Resources.Reader.csproj
+++ b/src/libraries/System.Resources.Reader/src/System.Resources.Reader.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<RootNamespace>System.Resources</RootNamespace>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Resources.ResourceManager/ref/System.Resources.ResourceManager.csproj b/src/libraries/System.Resources.ResourceManager/ref/System.Resources.ResourceManager.csproj
index a1367c6a97a..7bfbabc8198 100644
--- a/src/libraries/System.Resources.ResourceManager/ref/System.Resources.ResourceManager.csproj
+++ b/src/libraries/System.Resources.ResourceManager/ref/System.Resources.ResourceManager.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Resources.ResourceManager/src/System.Resources.ResourceManager.csproj b/src/libraries/System.Resources.ResourceManager/src/System.Resources.ResourceManager.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Resources.ResourceManager/src/System.Resources.ResourceManager.csproj
+++ b/src/libraries/System.Resources.ResourceManager/src/System.Resources.ResourceManager.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Resources.Writer/ref/System.Resources.Writer.csproj b/src/libraries/System.Resources.Writer/ref/System.Resources.Writer.csproj
index 5d9d0ee9332..89d629821c6 100644
--- a/src/libraries/System.Resources.Writer/ref/System.Resources.Writer.csproj
+++ b/src/libraries/System.Resources.Writer/ref/System.Resources.Writer.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Resources.Writer.cs" />
diff --git a/src/libraries/System.Resources.Writer/src/System.Resources.Writer.csproj b/src/libraries/System.Resources.Writer/src/System.Resources.Writer.csproj
index b910ab24e06..b476784344b 100644
--- a/src/libraries/System.Resources.Writer/src/System.Resources.Writer.csproj
+++ b/src/libraries/System.Resources.Writer/src/System.Resources.Writer.csproj
@@ -3,7 +3,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace>System.Resources</RootNamespace>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Resources\__FastResourceComparer.cs" />
diff --git a/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj b/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj
index a567a23967c..a9da990b9c9 100644
--- a/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj
+++ b/src/libraries/System.Runtime.Caching/src/System.Runtime.Caching.csproj
@@ -66,7 +66,7 @@ System.Runtime.Caching.ObjectCache</PackageDescription>
<Compile Include="System\Runtime\Caching\Hosting\IMemoryCacheManager.cs" />
<Compile Include="System\Runtime\Caching\Resources\RH.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Runtime\Caching\MemoryMonitor.Windows.cs" />
<Compile Include="System\Runtime\Caching\PhysicalMemoryMonitor.Windows.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.BOOL.cs" Link="Common\Interop\Windows\Interop.BOOL.cs" />
@@ -74,7 +74,7 @@ System.Runtime.Caching.ObjectCache</PackageDescription>
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.MEMORYSTATUSEX.cs" Link="Common\Interop\Windows\Kernel32\Interop.MEMORYSTATUSEX.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs" Link="Common\Interop\Windows\Interop.Libraries.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="System\Runtime\Caching\PhysicalMemoryMonitor.Unix.cs" />
</ItemGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.CompilerServices.VisualC/ref/System.Runtime.CompilerServices.VisualC.csproj b/src/libraries/System.Runtime.CompilerServices.VisualC/ref/System.Runtime.CompilerServices.VisualC.csproj
index c63584df9a6..a4367378e73 100644
--- a/src/libraries/System.Runtime.CompilerServices.VisualC/ref/System.Runtime.CompilerServices.VisualC.csproj
+++ b/src/libraries/System.Runtime.CompilerServices.VisualC/ref/System.Runtime.CompilerServices.VisualC.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.CompilerServices.VisualC.cs" />
diff --git a/src/libraries/System.Runtime.CompilerServices.VisualC/src/System.Runtime.CompilerServices.VisualC.csproj b/src/libraries/System.Runtime.CompilerServices.VisualC/src/System.Runtime.CompilerServices.VisualC.csproj
index d0ca0d4c320..e870ee09799 100644
--- a/src/libraries/System.Runtime.CompilerServices.VisualC/src/System.Runtime.CompilerServices.VisualC.csproj
+++ b/src/libraries/System.Runtime.CompilerServices.VisualC/src/System.Runtime.CompilerServices.VisualC.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<Nullable>enable</Nullable>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<!-- Shared CoreCLR -->
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj b/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
index 7114edf7757..f229a168120 100644
--- a/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
+++ b/src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
@@ -9,7 +9,7 @@
Remove warning disable when nullable attributes are respected,
Type has no accessible constructors which use only CLS-compliant types -->
<NoWarn>$(NoWarn);0809;0618;CS8614;CS3015;NU5131</NoWarn>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Condition="'$(FeatureGenericMath)' == 'true'">
diff --git a/src/libraries/System.Runtime.Extensions/ref/System.Runtime.Extensions.csproj b/src/libraries/System.Runtime.Extensions/ref/System.Runtime.Extensions.csproj
index 32152c73ed4..23001b05b96 100644
--- a/src/libraries/System.Runtime.Extensions/ref/System.Runtime.Extensions.csproj
+++ b/src/libraries/System.Runtime.Extensions/ref/System.Runtime.Extensions.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<NoWarn>$(NoWarn);CS0618</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
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 b6029a4baee..748322734e2 100644
--- a/src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj
+++ b/src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj b/src/libraries/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj
index 71788c421b4..9574f7d433c 100644
--- a/src/libraries/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj
+++ b/src/libraries/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj
@@ -1,12 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <DefineConstants Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">$(DefineConstants);Unix</DefineConstants>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<EnableDllImportGenerator>true</EnableDllImportGenerator>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser</TargetFrameworks>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
+ <PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">$(DefineConstants);Unix</DefineConstants>
+ </PropertyGroup>
<ItemGroup>
<Compile Include="System\ApplicationIdTests.cs" />
<Compile Include="System\Convert.cs" />
@@ -76,7 +80,7 @@
<Compile Include="System\Runtime\ProfileOptimization.cs" />
<Compile Include="System\Runtime\CompilerServices\SwitchExpressionExceptionTests.cs" />
- <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.GetHostName.cs" Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'" Link="Common\Interop\Unix\System.Native\Interop.GetHostName.cs" />
+ <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.GetHostName.cs" Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'" Link="Common\Interop\Unix\System.Native\Interop.GetHostName.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs" Link="Common\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(CommonTestPath)System\IO\PathFeatures.cs" Link="Common\System\IO\PathFeatures.cs" />
<Compile Include="$(CommonTestPath)System\ShouldNotBeInvokedException.cs" Link="Common\System\ShouldNotBeInvokedException.cs" />
diff --git a/src/libraries/System.Runtime.Handles/ref/System.Runtime.Handles.csproj b/src/libraries/System.Runtime.Handles/ref/System.Runtime.Handles.csproj
index 87bea6d58fd..39ab002c1e7 100644
--- a/src/libraries/System.Runtime.Handles/ref/System.Runtime.Handles.csproj
+++ b/src/libraries/System.Runtime.Handles/ref/System.Runtime.Handles.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Handles/src/System.Runtime.Handles.csproj b/src/libraries/System.Runtime.Handles/src/System.Runtime.Handles.csproj
index 94d0c640130..36c7cb1bdde 100644
--- a/src/libraries/System.Runtime.Handles/src/System.Runtime.Handles.csproj
+++ b/src/libraries/System.Runtime.Handles/src/System.Runtime.Handles.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.csproj b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.csproj
index f752541dd44..6a61700686d 100644
--- a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.csproj
+++ b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.InteropServices.RuntimeInformation.Forwards.cs" />
diff --git a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj
index 94d0c640130..36c7cb1bdde 100644
--- a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj
+++ b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.csproj b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.csproj
index f2533619f26..c7219439445 100644
--- a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.csproj
+++ b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.csproj
@@ -5,7 +5,7 @@
<!-- Nullability of parameter 'name' doesn't match overridden member -->
<NoWarn>$(NoWarn);618;CS8765</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj b/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj
index 3bc59997f7f..49ebaf784dc 100644
--- a/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj
+++ b/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Runtime\CompilerServices\IDispatchConstantAttribute.cs" />
diff --git a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj
index 4dc5e6b4350..072080790a2 100644
--- a/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj
+++ b/src/libraries/System.Runtime.InteropServices/tests/System.Runtime.InteropServices.UnitTests/System.Runtime.InteropServices.Tests.csproj
@@ -22,7 +22,7 @@
<Compile Include="System\Runtime\InteropServices\CollectionsMarshalTests.cs" />
<Compile Include="System\Runtime\InteropServices\ComAliasNameAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\ComAwareEventInfoTests.cs" />
- <Compile Include="System\Runtime\InteropServices\ComAwareEventInfoTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\ComAwareEventInfoTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\ComCompatibleVersionAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\ComConversionLossAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\ComDefaultInterfaceAttributeTests.cs" />
@@ -61,47 +61,47 @@
<Compile Include="System\Runtime\InteropServices\Marshal\AllocHGlobalTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\BindToMonikerTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\ChangeWrapperHandleStrengthTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\ChangeWrapperHandleStrengthTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\ChangeWrapperHandleStrengthTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\CreateAggregatedObjectTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\CreateWrapperOfTypeTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\CreateWrapperOfTypeTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\CreateWrapperOfTypeTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\DestroyStructureTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\FinalReleaseComObjectTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\FinalReleaseComObjectTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\FinalReleaseComObjectTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\FreeBSTRTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\FreeCoTaskMemTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\FreeHGlobalTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\GenerateGuidForTypeTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
- <Compile Include="System\Runtime\InteropServices\Marshal\GenerateProgIdForTypeTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\GenerateGuidForTypeTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\GenerateProgIdForTypeTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetComInterfaceForObjectTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\GetComObjectDataTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\GetComObjectDataTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetDelegateForFunctionPointerTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetExceptionCodeTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetExceptionForHRTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetFunctionPointerForDelegateTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetHRForExceptionTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\GetIDispatchForObjectTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\GetIDispatchForObjectTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetIUnknownForObjectTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\GetNativeVariantForObjectTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\GetNativeVariantForObjectTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetNativeVariantForObjectTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\GetObjectForIUnknownTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\GetObjectForIUnknownTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetObjectForIUnknownTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetObjectForNativeVariantTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\GetObjectForNativeVariantTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\GetObjectForNativeVariantTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetObjectsForNativeVariantsTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetStartComSlotTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\GetStartComSlotTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\GetStartComSlotTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetTypeFromCLSIDTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetTypeInfoNameTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetUniqueObjectForIUnknownTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\GetUniqueObjectForIUnknownTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\GetUniqueObjectForIUnknownTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\InitHandleTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\IsComObjectTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\IsComObjectTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\IsComObjectTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\LastErrorTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\ReleaseTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\ReleaseComObjectTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\ReleaseComObjectTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\ReleaseComObjectTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\PtrToStructureTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\PtrToStringAnsiTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\PtrToStringAutoTests.cs" />
@@ -109,7 +109,7 @@
<Compile Include="System\Runtime\InteropServices\Marshal\PtrToStringUniTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\PtrToStringUTF8Tests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\QueryInterfaceTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\QueryInterfaceTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\QueryInterfaceTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\ReAllocHGlobalTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\ReAllocCoTaskMemTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\SecureStringToBSTRTests.cs" />
@@ -117,7 +117,7 @@
<Compile Include="System\Runtime\InteropServices\Marshal\SecureStringToCoTaskMemUnicodeTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\SecureStringToGlobalAllocAnsiTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\SecureStringToGlobalAllocUnicodeTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\SetComObjectDataTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\SetComObjectDataTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\SizeOfTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\StringToBSTRTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\StringToCoTaskMemAnsiTests.cs" />
@@ -138,7 +138,7 @@
<Compile Include="System\Runtime\InteropServices\Marshal\ZeroFreeGlobalAllocUnicodeTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\Common\CommonTypes.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\Common\COMWrappersImpl.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\Common\CommonTypes.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\Common\CommonTypes.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\Common\Variant.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\ReadWrite\ByteTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\ReadWrite\Int16Tests.cs" />
@@ -171,14 +171,14 @@
<Compile Include="System\Runtime\InteropServices\Marshal\GenerateProgIdForTypeTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetComObjectDataTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetEndComSlotTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\GetEndComSlotTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\GetEndComSlotTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetExceptionPointersTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetHINSTANCETests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetIDispatchForObjectTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\GetTypedObjectForIUnknownTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\GetTypedObjectForIUnknownTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\GetTypedObjectForIUnknownTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\IsTypeVisibleFromComTests.cs" />
- <Compile Include="System\Runtime\InteropServices\Marshal\IsTypeVisibleFromComTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="System\Runtime\InteropServices\Marshal\IsTypeVisibleFromComTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="System\Runtime\InteropServices\Marshal\SetComObjectDataTests.cs" />
<Compile Include="System\Runtime\InteropServices\TypeLibFuncAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\TypeLibImportClassAttributeTests.cs" />
@@ -186,10 +186,10 @@
<Compile Include="System\Runtime\InteropServices\TypeLibVarAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\TypeLibVersionAttributeTests.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Runtime\InteropServices\PosixSignalRegistrationTests.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="System\Runtime\InteropServices\PosixSignalRegistrationTests.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs" Link="Common\Interop\Unix\Interop.Libraries.cs" />
</ItemGroup>
diff --git a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj
index 99d42572c65..a2f37c85cd4 100644
--- a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj
+++ b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj b/src/libraries/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj
index dd3dc2940a5..5ecfe239de6 100644
--- a/src/libraries/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj
+++ b/src/libraries/System.Runtime.Intrinsics/src/System.Runtime.Intrinsics.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.csproj b/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.csproj
index f167ed3e9de..92bc3b365e0 100644
--- a/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.csproj
+++ b/src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Loader/src/System.Runtime.Loader.csproj b/src/libraries/System.Runtime.Loader/src/System.Runtime.Loader.csproj
index dd3dc2940a5..5ecfe239de6 100644
--- a/src/libraries/System.Runtime.Loader/src/System.Runtime.Loader.csproj
+++ b/src/libraries/System.Runtime.Loader/src/System.Runtime.Loader.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Numerics/ref/System.Runtime.Numerics.csproj b/src/libraries/System.Runtime.Numerics/ref/System.Runtime.Numerics.csproj
index 39e712be062..03c9a9dd37e 100644
--- a/src/libraries/System.Runtime.Numerics/ref/System.Runtime.Numerics.csproj
+++ b/src/libraries/System.Runtime.Numerics/ref/System.Runtime.Numerics.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.Numerics.cs" />
diff --git a/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj b/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj
index d61ea2546b1..5c2f63834c3 100644
--- a/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj
+++ b/src/libraries/System.Runtime.Numerics/src/System.Runtime.Numerics.csproj
@@ -3,7 +3,7 @@
<RootNamespace>System.Numerics</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Numerics\BigIntegerCalculator.AddSub.cs" />
diff --git a/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.csproj b/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.csproj
index 20657fa0322..c3192c2662a 100644
--- a/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.csproj
+++ b/src/libraries/System.Runtime.Serialization.Formatters/ref/System.Runtime.Serialization.Formatters.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System.Runtime.Serialization.Formatters.csproj b/src/libraries/System.Runtime.Serialization.Formatters/src/System.Runtime.Serialization.Formatters.csproj
index 137d1e55d6a..45a23280109 100644
--- a/src/libraries/System.Runtime.Serialization.Formatters/src/System.Runtime.Serialization.Formatters.csproj
+++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System.Runtime.Serialization.Formatters.csproj
@@ -1,16 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-Android;</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-Android</TargetFrameworks>
<Nullable>enable</Nullable>
- <!-- When we replace implementations with PNSE, need to suppress some "field is never assigned to" warnings. -->
- <NoWarn Condition="'$(TargetsMobile)' == 'true'">$(NoWarn);CS0649</NoWarn>
+ <!-- ILLinker settings -->
+ <ILLinkDirectory>$(MSBuildThisFileDirectory)ILLink\</ILLinkDirectory>
</PropertyGroup>
- <!-- ILLinker settings -->
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <ILLinkDirectory>$(MSBuildThisFileDirectory)ILLink\</ILLinkDirectory>
+ <TargetPlatformIdentifier Condition="$(TargetFramework.Contains('-'))">$(TargetFramework.SubString($([MSBuild]::Add($(TargetFramework.IndexOf('-')), 1))))</TargetPlatformIdentifier>
+ <!-- TargetsMobile: When we replace implementations with PNSE, need to suppress some "field is never assigned to" warnings. -->
+ <NoWarn Condition="'$(TargetPlatformIdentifier)' != ''">$(NoWarn);CS0649</NoWarn>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsMobile)' != 'true'">
- <ILLinkSubstitutionsXmls Include="$(ILLinkDirectory)ILLink.Substitutions.NonMobile.xml" />
+ <ItemGroup>
+ <ILLinkSubstitutionsXmls Condition="'$(TargetPlatformIdentifier)' == ''" Include="$(ILLinkDirectory)ILLink.Substitutions.NonMobile.xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="System.Runtime.Serialization.Formatters.TypeForwards.cs" />
@@ -67,14 +69,14 @@
<Compile Include="$(CoreLibSharedDir)System\Collections\HashHelpers.cs"
Link="Common\System\Collections\HashHelpers.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsMobile)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == ''">
<Compile Include="System\Runtime\Serialization\Formatters\Binary\BinaryFormatter.Core.cs" />
<Compile Include="System\Runtime\Serialization\LocalAppContextSwitches.cs" />
<Compile Include="$(CommonPath)System\LocalAppContextSwitches.Common.cs">
<Link>Common\System\LocalAppContextSwitches.Common.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsMobile)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
<Compile Include="System\Runtime\Serialization\Formatters\Binary\BinaryFormatter.PlatformNotSupported.cs" />
</ItemGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj b/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj
index 0974cc86d7d..bb5a72a9fd2 100644
--- a/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj
+++ b/src/libraries/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj
@@ -12,7 +12,7 @@
<Compile Include="OptionalFieldAttributeTests.cs" />
<Compile Include="FormatterConverterTests.cs" />
<Compile Include="FormatterServicesTests.cs" />
- <Compile Include="FormatterServicesTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="FormatterServicesTests.Windows.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="FormatterTests.cs" />
<Compile Include="PlatformExtensions.cs" />
<Compile Include="SerializationBinderTests.cs" />
@@ -28,7 +28,7 @@
<Compile Include="$(CommonTestPath)System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs"
Link="Common\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)' == 'net48'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Compile Include="$(CommonPath)System\Collections\Generic\ReferenceEqualityComparer.cs"
Link="Common\System\Collections\Generic\ReferenceEqualityComparer.cs" />
</ItemGroup>
diff --git a/src/libraries/System.Runtime.Serialization.Json/ref/System.Runtime.Serialization.Json.csproj b/src/libraries/System.Runtime.Serialization.Json/ref/System.Runtime.Serialization.Json.csproj
index a25d7b6d5c1..8f1c520afdc 100644
--- a/src/libraries/System.Runtime.Serialization.Json/ref/System.Runtime.Serialization.Json.csproj
+++ b/src/libraries/System.Runtime.Serialization.Json/ref/System.Runtime.Serialization.Json.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Serialization.Json/src/System.Runtime.Serialization.Json.csproj b/src/libraries/System.Runtime.Serialization.Json/src/System.Runtime.Serialization.Json.csproj
index 9cdaf74ee95..0ad2fb06652 100644
--- a/src/libraries/System.Runtime.Serialization.Json/src/System.Runtime.Serialization.Json.csproj
+++ b/src/libraries/System.Runtime.Serialization.Json/src/System.Runtime.Serialization.Json.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.csproj b/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.csproj
index bcb2151821a..065dfb3ceb9 100644
--- a/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.csproj
+++ b/src/libraries/System.Runtime.Serialization.Primitives/ref/System.Runtime.Serialization.Primitives.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.Serialization.Primitives.cs" />
diff --git a/src/libraries/System.Runtime.Serialization.Primitives/src/System.Runtime.Serialization.Primitives.csproj b/src/libraries/System.Runtime.Serialization.Primitives/src/System.Runtime.Serialization.Primitives.csproj
index e314354aef4..7026150754e 100644
--- a/src/libraries/System.Runtime.Serialization.Primitives/src/System.Runtime.Serialization.Primitives.csproj
+++ b/src/libraries/System.Runtime.Serialization.Primitives/src/System.Runtime.Serialization.Primitives.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Runtime\Serialization\CollectionDataContractAttribute.cs" />
diff --git a/src/libraries/System.Runtime.Serialization.Xml/ref/System.Runtime.Serialization.Xml.csproj b/src/libraries/System.Runtime.Serialization.Xml/ref/System.Runtime.Serialization.Xml.csproj
index 4e128a35ab0..a79c1b8fae2 100644
--- a/src/libraries/System.Runtime.Serialization.Xml/ref/System.Runtime.Serialization.Xml.csproj
+++ b/src/libraries/System.Runtime.Serialization.Xml/ref/System.Runtime.Serialization.Xml.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime.Serialization.Xml/src/System.Runtime.Serialization.Xml.csproj b/src/libraries/System.Runtime.Serialization.Xml/src/System.Runtime.Serialization.Xml.csproj
index dfb110cefca..7834886d249 100644
--- a/src/libraries/System.Runtime.Serialization.Xml/src/System.Runtime.Serialization.Xml.csproj
+++ b/src/libraries/System.Runtime.Serialization.Xml/src/System.Runtime.Serialization.Xml.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Runtime/ref/System.Runtime.csproj b/src/libraries/System.Runtime/ref/System.Runtime.csproj
index 9cbad9dddb8..1bdbbe8c5bf 100644
--- a/src/libraries/System.Runtime/ref/System.Runtime.csproj
+++ b/src/libraries/System.Runtime/ref/System.Runtime.csproj
@@ -8,7 +8,7 @@
Remove warning disable when nullable attributes are respected,
Type has no accessible constructors which use only CLS-compliant types -->
<NoWarn>$(NoWarn);0809;0618;CS8614;CS3015</NoWarn>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
diff --git a/src/libraries/System.Runtime/src/System.Runtime.csproj b/src/libraries/System.Runtime/src/System.Runtime.csproj
index 8d726a13147..b8df760b6ba 100644
--- a/src/libraries/System.Runtime/src/System.Runtime.csproj
+++ b/src/libraries/System.Runtime/src/System.Runtime.csproj
@@ -3,7 +3,7 @@
<!-- Pull type forwards from the experimental ref assembly so we only need to maintain a single src project -->
<ContractProject>$(LibrariesProjectRoot)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj</ContractProject>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
<!-- The following 2 lines disable the automatic generation of the [RequiresPreviewFeatures] assembly level attribute and set LangVersion to Preview on the latest TFM-->
<EnablePreviewFeatures>True</EnablePreviewFeatures>
diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj
index 051fe609d63..c45a71ac872 100644
--- a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj
+++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj
@@ -247,7 +247,7 @@
<Compile Include="System\Type\TypeTests.Get.cs" />
<Compile Include="$(CommonTestPath)System\RandomDataGenerator.cs" Link="Common\System\RandomDataGenerator.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="System\ExitCodeTests.Unix.cs" />
</ItemGroup>
<ItemGroup Condition="'$(FeatureGenericMath)' == 'true'">
diff --git a/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.csproj b/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.csproj
index 391997c918a..46e8ce511e7 100644
--- a/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.csproj
+++ b/src/libraries/System.Security.AccessControl/ref/System.Security.AccessControl.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.AccessControl/src/System.Security.AccessControl.csproj b/src/libraries/System.Security.AccessControl/src/System.Security.AccessControl.csproj
index 98ab4777d2f..8bdc585baa1 100644
--- a/src/libraries/System.Security.AccessControl/src/System.Security.AccessControl.csproj
+++ b/src/libraries/System.Security.AccessControl/src/System.Security.AccessControl.csproj
@@ -6,9 +6,10 @@
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Security\AccessControl\ACE.cs" />
<Compile Include="System\Security\AccessControl\ACL.cs" />
<Compile Include="System\Security\AccessControl\CommonObjectSecurity.cs" />
diff --git a/src/libraries/System.Security.Claims/ref/System.Security.Claims.csproj b/src/libraries/System.Security.Claims/ref/System.Security.Claims.csproj
index 33820c62332..df5828adf20 100644
--- a/src/libraries/System.Security.Claims/ref/System.Security.Claims.csproj
+++ b/src/libraries/System.Security.Claims/ref/System.Security.Claims.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Claims/src/System.Security.Claims.csproj b/src/libraries/System.Security.Claims/src/System.Security.Claims.csproj
index ca4bd80a6eb..3af8bb328c7 100644
--- a/src/libraries/System.Security.Claims/src/System.Security.Claims.csproj
+++ b/src/libraries/System.Security.Claims/src/System.Security.Claims.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.csproj b/src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.csproj
index 6f78fdf5bfd..959864f04e6 100644
--- a/src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.csproj
+++ b/src/libraries/System.Security.Cryptography.Algorithms/ref/System.Security.Cryptography.Algorithms.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<NoWarn>$(NoWarn);SYSLIB0021;SYSLIB0022</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
diff --git a/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj b/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj
index ccd9e34fe31..6af3caadf5a 100644
--- a/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj
+++ b/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.Cng/ref/System.Security.Cryptography.Cng.csproj b/src/libraries/System.Security.Cryptography.Cng/ref/System.Security.Cryptography.Cng.csproj
index a333acc0151..f9381da6532 100644
--- a/src/libraries/System.Security.Cryptography.Cng/ref/System.Security.Cryptography.Cng.csproj
+++ b/src/libraries/System.Security.Cryptography.Cng/ref/System.Security.Cryptography.Cng.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.Cng/src/System.Security.Cryptography.Cng.csproj b/src/libraries/System.Security.Cryptography.Cng/src/System.Security.Cryptography.Cng.csproj
index 1fe031a388f..40d5a22195c 100644
--- a/src/libraries/System.Security.Cryptography.Cng/src/System.Security.Cryptography.Cng.csproj
+++ b/src/libraries/System.Security.Cryptography.Cng/src/System.Security.Cryptography.Cng.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.Cng/tests/System.Security.Cryptography.Cng.Tests.csproj b/src/libraries/System.Security.Cryptography.Cng/tests/System.Security.Cryptography.Cng.Tests.csproj
index 3ab50a56b04..e6d642f010d 100644
--- a/src/libraries/System.Security.Cryptography.Cng/tests/System.Security.Cryptography.Cng.Tests.csproj
+++ b/src/libraries/System.Security.Cryptography.Cng/tests/System.Security.Cryptography.Cng.Tests.csproj
@@ -14,7 +14,7 @@
<Compile Include="SymmetricCngTestHelpers.cs" />
<Compile Include="TestData.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\AES\AesCipherTests.Data.cs"
Link="CommonTest\AlgorithmImplementations\AES\AesCipherTests.Data.cs" />
<Compile Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\AES\AesCornerTests.cs"
@@ -140,8 +140,8 @@
Link="CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\RSAXml.cs" />
<Compile Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\RSA\SignVerify.netcoreapp.cs"
Link="CommonTest\System\Security\Cryptography\AlgorithmImplementations\RSA\SignVerify.netcoreapp.cs" />
- <Compile Condition="'$(TargetsWindows)' == 'true'" Include="AesCngTests.cs" />
- <Compile Condition="'$(TargetsWindows)' == 'true'" Include="TripleDESCngTests.cs" />
+ <Compile Condition="'$(TargetPlatformIdentifier)' == 'windows'" Include="AesCngTests.cs" />
+ <Compile Condition="'$(TargetPlatformIdentifier)' == 'windows'" Include="TripleDESCngTests.cs" />
<Compile Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\TripleDES\TripleDESContractTests.cs"
Link="CommonTest\System\Security\Cryptography\AlgorithmImplementations\TripleDES\TripleDESContractTests.cs" />
<Compile Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\AES\AesContractTests.cs"
@@ -152,11 +152,11 @@
Link="CommonTest\System\Security\Cryptography\AlgorithmImplementations\TripleDES\TripleDESCipherOneShotTests.cs" />
<Compile Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\AES\AesModeTests.cs"
Link="CommonTest\AlgorithmImplementations\AES\AesModeTests.cs" />
- <Compile Condition="'$(TargetsWindows)' == 'true'" Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\TripleDES\TripleDESReusabilityTests.cs"
+ <Compile Condition="'$(TargetPlatformIdentifier)' == 'windows'" Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\TripleDES\TripleDESReusabilityTests.cs"
Link="CommonTest\System\Security\Cryptography\AlgorithmImplementations\TripleDES\TripleDESReusabilityTests.cs" />
- <Compile Condition="'$(TargetsWindows)' == 'true'" Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\AES\AesCipherTests.cs"
+ <Compile Condition="'$(TargetPlatformIdentifier)' == 'windows'" Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\AES\AesCipherTests.cs"
Link="CommonTest\AlgorithmImplementations\AES\AesCipherTests.cs" />
- <Compile Condition="'$(TargetsWindows)' == 'true'" Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\AES\AesCipherOneShotTests.cs"
+ <Compile Condition="'$(TargetPlatformIdentifier)' == 'windows'" Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\AES\AesCipherOneShotTests.cs"
Link="CommonTest\AlgorithmImplementations\AES\AesCipherTests.OneShot" />
<Compile Include="ECDiffieHellmanCngTests.cs" />
<Compile Include="$(CommonTestPath)System\Security\Cryptography\AlgorithmImplementations\ECDiffieHellman\ECDiffieHellmanTests.cs"
diff --git a/src/libraries/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.csproj b/src/libraries/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.csproj
index 19181bd717e..ceccd4c8426 100644
--- a/src/libraries/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.csproj
+++ b/src/libraries/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<NoWarn>$(NoWarn);CS0809</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
diff --git a/src/libraries/System.Security.Cryptography.Csp/src/System.Security.Cryptography.Csp.csproj b/src/libraries/System.Security.Cryptography.Csp/src/System.Security.Cryptography.Csp.csproj
index 722700b99b1..5e5200e76e4 100644
--- a/src/libraries/System.Security.Cryptography.Csp/src/System.Security.Cryptography.Csp.csproj
+++ b/src/libraries/System.Security.Cryptography.Csp/src/System.Security.Cryptography.Csp.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Memory" />
diff --git a/src/libraries/System.Security.Cryptography.Encoding/ref/System.Security.Cryptography.Encoding.csproj b/src/libraries/System.Security.Cryptography.Encoding/ref/System.Security.Cryptography.Encoding.csproj
index 482a8c25218..e11be11a50c 100644
--- a/src/libraries/System.Security.Cryptography.Encoding/ref/System.Security.Cryptography.Encoding.csproj
+++ b/src/libraries/System.Security.Cryptography.Encoding/ref/System.Security.Cryptography.Encoding.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj b/src/libraries/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj
index da0251ebe34..6102b48ffc2 100644
--- a/src/libraries/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj
+++ b/src/libraries/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<Nullable>enable</Nullable>
</PropertyGroup>
diff --git a/src/libraries/System.Security.Cryptography.OpenSsl/ref/System.Security.Cryptography.OpenSsl.csproj b/src/libraries/System.Security.Cryptography.OpenSsl/ref/System.Security.Cryptography.OpenSsl.csproj
index 225e8cf6880..474b4123f3b 100644
--- a/src/libraries/System.Security.Cryptography.OpenSsl/ref/System.Security.Cryptography.OpenSsl.csproj
+++ b/src/libraries/System.Security.Cryptography.OpenSsl/ref/System.Security.Cryptography.OpenSsl.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj b/src/libraries/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj
index 1fe031a388f..40d5a22195c 100644
--- a/src/libraries/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj
+++ b/src/libraries/System.Security.Cryptography.OpenSsl/src/System.Security.Cryptography.OpenSsl.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj b/src/libraries/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj
index e139314a91c..c57a5864c55 100644
--- a/src/libraries/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj
+++ b/src/libraries/System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj
@@ -5,7 +5,7 @@
https://github.com/dotnet/runtime/issues/49083 -->
<IgnoreForCI Condition="'$(TargetOS)' == 'OSX' and '$(TargetArchitecture)' == 'arm64' ">true</IgnoreForCI>
<!-- The library is not supported on mobile platforms (PNSE) -->
- <IgnoreForCI Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">true</IgnoreForCI>
+ <IgnoreForCI Condition="'$(TargetOS)' == 'Android' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS'">true</IgnoreForCI>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EnableDllImportGenerator>true</EnableDllImportGenerator>
</PropertyGroup>
diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj b/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj
index 4c0f530d5fa..57ed54ee88f 100644
--- a/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj
+++ b/src/libraries/System.Security.Cryptography.Pkcs/src/System.Security.Cryptography.Pkcs.csproj
@@ -16,12 +16,12 @@ System.Security.Cryptography.Pkcs.EnvelopedCms</PackageDescription>
<IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
<OmitResources Condition="'$(IsPartialFacadeAssembly)' == 'true'">true</OmitResources>
</PropertyGroup>
+
<Import Project="$(CommonPath)System\Security\Cryptography\Asn1\AsnXml.targets" Condition="'$(IsPartialFacadeAssembly)' != 'true'" />
<Import Project="$(CommonPath)System\Security\Cryptography\Asn1Reader\System.Security.Cryptography.Asn1Reader.Shared.projitems" Condition="'$(IsPartialFacadeAssembly)' != 'true'" />
- <!-- Don't delete these clauses even if they look useless. They tell the VS IDE that "Windows_Debug", etc., are
- valid configuration for this project and stop it from trying to "fix up" the .sln file -->
- <!-- API types (platform independent) -->
+
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
+ <!-- API types (platform independent) -->
<Compile Include="System\Security\Cryptography\CryptographicAttributeObject.cs" />
<Compile Include="System\Security\Cryptography\CryptographicAttributeObjectCollection.cs" />
<Compile Include="System\Security\Cryptography\CryptographicAttributeObjectEnumerator.cs" />
@@ -49,11 +49,8 @@ System.Security.Cryptography.Pkcs.EnvelopedCms</PackageDescription>
<Compile Include="System\Security\Cryptography\Pkcs\SubjectIdentifierOrKeyType.cs" />
<Compile Include="System\Security\Cryptography\Pkcs\SubjectIdentifierType.cs" />
<Compile Include="System\Security\Cryptography\Xml\X509IssuerSerial.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(IsPartialFacadeAssembly)' == 'true'">
- </ItemGroup>
- <!-- Internal types (platform independent) -->
- <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
+
+ <!-- Internal types (platform independent) -->
<Compile Include="Internal\Cryptography\DecryptorPal.cs" />
<Compile Include="Internal\Cryptography\KeyAgreeRecipientInfoPal.cs" />
<Compile Include="Internal\Cryptography\KeyLengths.cs" />
@@ -65,13 +62,6 @@ System.Security.Cryptography.Pkcs.EnvelopedCms</PackageDescription>
Link="Internal\Cryptography\Helpers.cs" />
<Compile Include="$(CommonPath)System\HexConverter.cs"
Link="Common\System\HexConverter.cs" />
- </ItemGroup>
- <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
- <Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
- Link="Common\DisableRuntimeMarshalling.cs" />
- </ItemGroup>
- <!-- Internal types (platform: AnyOS) -->
- <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<AsnXml Include="$(CommonPath)System\Security\Cryptography\Asn1\Pkcs7\ContentInfoAsn.xml">
<Link>Common\System\Security\Cryptography\Asn1\Pkcs7\ContentInfoAsn.xml</Link>
</AsnXml>
@@ -144,8 +134,14 @@ System.Security.Cryptography.Pkcs.EnvelopedCms</PackageDescription>
<DependentUpon>System\Security\Cryptography\Pkcs\Asn1\RecipientKeyIdentifier.xml</DependentUpon>
</Compile>
</ItemGroup>
- <!-- Internal types (platform: Windows) -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(IsPartialFacadeAssembly)' != 'true'">
+
+ <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
+ <Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
+ Link="Common\DisableRuntimeMarshalling.cs" />
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
+ <!-- Internal types (platform: Windows) -->
<Compile Include="Internal\Cryptography\Pal\Windows\AlgId.cs" />
<Compile Include="Internal\Cryptography\Pal\Windows\DecryptorPalWindows.cs" />
<Compile Include="Internal\Cryptography\Pal\Windows\DecryptorPalWindows.Decode.cs" />
@@ -163,9 +159,8 @@ System.Security.Cryptography.Pkcs.EnvelopedCms</PackageDescription>
<Compile Include="Microsoft\Win32\SafeHandles\SafeHeapAllocHandle.cs" />
<Compile Include="Microsoft\Win32\SafeHandles\SafeProvOrNCryptKeyHandle.cs" />
<Compile Include="Microsoft\Win32\SafeHandles\SafeProvOrNCryptKeyHandleUwp.cs" />
- </ItemGroup>
- <!-- Interop types (platform: Windows) -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(IsPartialFacadeAssembly)' != 'true'">
+
+ <!-- Interop types (platform: Windows) -->
<Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.CryptAcquireContext.cs"
Link="Common\Interop\Windows\Advapi32\Interop.CryptAcquireContext.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.CryptDestroyHash.cs"
@@ -308,18 +303,19 @@ System.Security.Cryptography.Pkcs.EnvelopedCms</PackageDescription>
Link="Common\Interop\Windows\NCrypt\Interop.NCryptFreeObject.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
- </ItemGroup>
- <!-- Common types (platform: Windows) -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(IsPartialFacadeAssembly)' != 'true'">
+
+ <!-- Common types (platform: Windows) -->
<Compile Include="$(CommonPath)Internal\Cryptography\Windows\CryptoThrowHelper.cs"
Link="Common\Internal\Cryptography\Windows\CryptoThrowHelper.cs" />
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeHandleCache.cs"
Link="Common\Microsoft\Win32\SafeHandles\SafeHandleCache.cs" />
</ItemGroup>
+
<!-- Internal types (platform: AnyOS) -->
- <ItemGroup Condition="'$(TargetsWindows)' != 'true' and '$(IsPartialFacadeAssembly)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows' and '$(IsPartialFacadeAssembly)' != 'true'">
<Compile Include="Internal\Cryptography\Pal\AnyOS\PkcsPal.AnyOS.cs" />
</ItemGroup>
+
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<Compile Include="$(CommonPath)System\Obsoletions.cs"
Link="Common\System\Obsoletions.cs" />
@@ -563,6 +559,7 @@ System.Security.Cryptography.Pkcs.EnvelopedCms</PackageDescription>
<Compile Include="System\Security\Cryptography\Pkcs\SignerInfoCollection.cs" />
<Compile Include="System\Security\Cryptography\Pkcs\SignerInfoEnumerator.cs" />
</ItemGroup>
+
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.1'))">
<Compile Include="$(CommonPath)System\Security\Cryptography\KeyFormatHelper.cs"
Link="Common\System\Security\Cryptography\KeyFormatHelper.cs" />
@@ -675,7 +672,7 @@ System.Security.Cryptography.Pkcs.EnvelopedCms</PackageDescription>
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
<Reference Include="System.Security.Cryptography" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp' and '$(IsPartialFacadeAssembly)' != 'true'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<PackageReference Include="System.Security.Cryptography.Cng" Version="$(SystemSecurityCryptographyCngVersion)" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard2.0'))">
diff --git a/src/libraries/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj b/src/libraries/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj
index b2c2be9f8f0..dbcbe329391 100644
--- a/src/libraries/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj
+++ b/src/libraries/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj
@@ -39,7 +39,7 @@
<Compile Include="EnvelopedCms\DecryptTestsRsaPaddingModeTests.cs" />
<Compile Include="EnvelopedCms\DecryptTestsUsingExplicitPrivateKey.cs" />
<Compile Include="EnvelopedCms\KeyTransRecipientInfoRsaOaepCertTests.cs" />
- <Compile Include="EnvelopedCms\DecryptTests.KeyPersistence.cs" Condition="'$(TargetsWindows)' == 'true'" />
+ <Compile Include="EnvelopedCms\DecryptTests.KeyPersistence.cs" Condition="'$(TargetPlatformIdentifier)' == 'windows'" />
<Compile Include="EnvelopedCms\KeyTransRecipientInfoRsaPaddingModeTests.cs" />
<Compile Include="EnvelopedCms\SubjectIdentifierTests.cs" />
<Compile Include="Pkcs12\CertBagTests.cs" />
diff --git a/src/libraries/System.Security.Cryptography.Primitives/ref/System.Security.Cryptography.Primitives.csproj b/src/libraries/System.Security.Cryptography.Primitives/ref/System.Security.Cryptography.Primitives.csproj
index 85b76a7c369..958cfe9a076 100644
--- a/src/libraries/System.Security.Cryptography.Primitives/ref/System.Security.Cryptography.Primitives.csproj
+++ b/src/libraries/System.Security.Cryptography.Primitives/ref/System.Security.Cryptography.Primitives.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.Primitives/src/System.Security.Cryptography.Primitives.csproj b/src/libraries/System.Security.Cryptography.Primitives/src/System.Security.Cryptography.Primitives.csproj
index 01600a4d505..d3eb8cf67d3 100644
--- a/src/libraries/System.Security.Cryptography.Primitives/src/System.Security.Cryptography.Primitives.csproj
+++ b/src/libraries/System.Security.Cryptography.Primitives/src/System.Security.Cryptography.Primitives.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.ProtectedData/src/System.Security.Cryptography.ProtectedData.csproj b/src/libraries/System.Security.Cryptography.ProtectedData/src/System.Security.Cryptography.ProtectedData.csproj
index 4880ca0aa09..9d505846d2f 100644
--- a/src/libraries/System.Security.Cryptography.ProtectedData/src/System.Security.Cryptography.ProtectedData.csproj
+++ b/src/libraries/System.Security.Cryptography.ProtectedData/src/System.Security.Cryptography.ProtectedData.csproj
@@ -13,11 +13,12 @@ System.Security.Cryptography.ProtectedData</PackageDescription>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
<OmitResources Condition="'$(IsPartialFacadeAssembly)' == 'true'">true</OmitResources>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_CryptographyProtectedData</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_CryptographyProtectedData</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="System\Security\Cryptography\DataProtectionScope.cs" />
<Compile Include="System\Security\Cryptography\ProtectedData.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CryptProtectData.cs"
@@ -39,7 +40,7 @@ System.Security.Cryptography.ProtectedData</PackageDescription>
<Compile Include="$(CommonPath)System\HResults.cs"
Link="Common\System\HResults.cs" />
</ItemGroup>
- <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0')) and '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0-windows'))">
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
</ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/ref/System.Security.Cryptography.X509Certificates.csproj b/src/libraries/System.Security.Cryptography.X509Certificates/ref/System.Security.Cryptography.X509Certificates.csproj
index 71d56f25038..c195646e0e5 100644
--- a/src/libraries/System.Security.Cryptography.X509Certificates/ref/System.Security.Cryptography.X509Certificates.csproj
+++ b/src/libraries/System.Security.Cryptography.X509Certificates/ref/System.Security.Cryptography.X509Certificates.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);SYSLIB0026</NoWarn>
</PropertyGroup>
diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj b/src/libraries/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj
index 1fe031a388f..40d5a22195c 100644
--- a/src/libraries/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj
+++ b/src/libraries/System.Security.Cryptography.X509Certificates/src/System.Security.Cryptography.X509Certificates.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj b/src/libraries/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj
index 2155c7384ef..fe4112c15fe 100644
--- a/src/libraries/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj
+++ b/src/libraries/System.Security.Cryptography.X509Certificates/tests/System.Security.Cryptography.X509Certificates.Tests.csproj
@@ -2,15 +2,17 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);HAVE_THUMBPRINT_OVERLOADS</DefineConstants>
- <DefineConstants Condition="'$(TargetsUnix)' == 'true'">$(DefineConstants);Unix</DefineConstants>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<NoWarn>$(NoWarn);SYSLIB0026;SYSLIB0027;SYSLIB0028</NoWarn>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS</TargetFrameworks>
<EnableDllImportGenerator>true</EnableDllImportGenerator>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <UseAndroidCrypto Condition="'$(TargetsAndroid)' == 'true'">true</UseAndroidCrypto>
- <UseAppleCrypto Condition="'$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">true</UseAppleCrypto>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'Unix' or '$(TargetPlatformIdentifier)' == 'Android' or '$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">$(DefineConstants);Unix</DefineConstants>
+ <UseAndroidCrypto Condition="'$(TargetPlatformIdentifier)' == 'Android'">true</UseAndroidCrypto>
+ <UseAppleCrypto Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">true</UseAppleCrypto>
</PropertyGroup>
<Import Project="$(CommonPath)System\Security\Cryptography\Asn1Reader\System.Security.Cryptography.Asn1Reader.Shared.projitems" />
<ItemGroup>
@@ -79,7 +81,7 @@
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' and '$(UseAndroidCrypto)' != 'true' and '$(UseAppleCrypto)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier)' != 'Browser' and '$(UseAndroidCrypto)' != 'true' and '$(UseAppleCrypto)' != 'true'">
<Compile Include="X509FilesystemTests.Unix.cs" />
<Compile Include="X509StoreTests.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.ChMod.cs"
@@ -126,7 +128,7 @@
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(UseAppleCrypto)' == 'true' AND '$(TargetsOSX)' == 'true'">
+ <ItemGroup Condition="'$(UseAppleCrypto)' == 'true' and '$(TargetPlatformIdentifier)' == 'OSX'">
<Compile Include="X509StoreMutableTests.OSX.cs" />
<Compile Include="$(CommonPath)Interop\OSX\Interop.CoreFoundation.cs"
Link="Common\Interop\OSX\Interop.CoreFoundation.cs" />
@@ -155,7 +157,7 @@
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeHandleCache.cs"
Link="Common\Microsoft\Win32\SafeHandles\SafeHandleCache.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(UseAppleCrypto)' == 'true' AND '$(TargetsOSX)' != 'true'">
+ <ItemGroup Condition="'$(UseAppleCrypto)' == 'true' and '$(TargetPlatformIdentifier)' != 'OSX'">
<Compile Include="X509StoreMutableTests.iOS.cs" />
</ItemGroup>
<ItemGroup>
@@ -163,7 +165,7 @@
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Pkcs\src\System.Security.Cryptography.Pkcs.csproj" />
<PackageReference Include="System.Security.Cryptography.X509Certificates.TestData" Version="$(SystemSecurityCryptographyX509CertificatesTestDataVersion)" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CERT_CONTEXT.cs"
Link="Common\Interop\Windows\Crypt32\Interop.CERT_CONTEXT.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CERT_INFO.cs"
diff --git a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.csproj b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.csproj
index 0b9ddef821d..27dbb3a844b 100644
--- a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.csproj
+++ b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);SYSLIB0026</NoWarn>
</PropertyGroup>
diff --git a/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj b/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj
index b503389947d..e76f61affe9 100644
--- a/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj
+++ b/src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj
@@ -3,22 +3,24 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);INTERNAL_ASYMMETRIC_IMPLEMENTATIONS</DefineConstants>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)</TargetFrameworks>
- <NoWarn>$(NoWarn);CA5350;CA5351;CA5379;CA5384</NoWarn>
+ <NoWarn>$(NoWarn);CA5350;CA5351;CA5379;CA5384;SYSLIB0026</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
+
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.SystemSecurityCryptography_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
- <NoWarn>$(NoWarn);SYSLIB0026</NoWarn>
- </PropertyGroup>
- <PropertyGroup>
- <UseAndroidCrypto Condition="'$(TargetsAndroid)' == 'true'">true</UseAndroidCrypto>
- <UseAppleCrypto Condition="'$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">true</UseAppleCrypto>
- <UseOpenSsl Condition="'$(TargetsUnix)' == 'true' and '$(UseAndroidCrypto)' != 'true' and '$(UseAppleCrypto)' != 'true'">true</UseOpenSsl>
- <UseOpenSslAead Condition="'$(UseOpenSsl)' == 'true' or '$(TargetsOSX)' == 'true'">true</UseOpenSslAead>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.SystemSecurityCryptography_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <UseAndroidCrypto Condition="'$(TargetPlatformIdentifier)' == 'Android'">true</UseAndroidCrypto>
+ <UseAppleCrypto Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS'">true</UseAppleCrypto>
+ <UseOpenSsl Condition="'$(TargetPlatformIdentifier)' == 'Unix'">true</UseOpenSsl>
+ <UseOpenSslAead Condition="'$(UseOpenSsl)' == 'true' or '$(TargetPlatformIdentifier)' == 'OSX'">true</UseOpenSslAead>
<NeedOpenSslInitializer Condition="'$(UseOpenSslAead)' == 'true'">true</NeedOpenSslInitializer>
</PropertyGroup>
+
<Import Project="$(CommonPath)System\Security\Cryptography\Asn1\AsnXml.targets" Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' == ''" />
<Import Project="$(CommonPath)System\Security\Cryptography\Asn1Reader\System.Security.Cryptography.Asn1Reader.Shared.projitems" Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' == ''" />
+
<ItemGroup Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' == ''">
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
@@ -533,7 +535,7 @@
<DependentUpon>System\Security\Cryptography\X509Certificates\Asn1\PolicyInformationAsn.xml</DependentUpon>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
Link="Common\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.GetRandomBytes.cs"
@@ -1207,7 +1209,7 @@
<Compile Include="System\Security\Cryptography\X509Certificates\X509Pal.Apple.ECKey.cs" />
<Compile Include="System\Security\Cryptography\X509Certificates\X509Pal.Apple.X500Name.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsOSX)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX'">
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs"
Link="Common\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs" />
<Compile Include="$(CommonPath)Microsoft\Win32\SafeHandles\SafeBignumHandle.Unix.cs"
@@ -1299,7 +1301,7 @@
<Compile Include="System\Security\Cryptography\X509Certificates\StorePal.macOS.LoaderPal.cs" />
<Compile Include="System\Security\Cryptography\X509Certificates\X509Pal.macOS.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(UseAppleCrypto)' == 'true' AND '$(TargetsOSX)' != 'true'">
+ <ItemGroup Condition="'$(UseAppleCrypto)' == 'true' and '$(TargetPlatformIdentifier)' != 'OSX'">
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Keychain.iOS.cs"
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Keychain.iOS.cs" />
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.X509.iOS.cs"
@@ -1328,7 +1330,7 @@
<Compile Include="System\Security\Cryptography\X509Certificates\UnsupportedDisallowedStore.cs" />
<Compile Include="System\Security\Cryptography\X509Certificates\X509Pal.iOS.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Internal\Cryptography\BasicSymmetricCipherBCrypt.cs"
Link="Common\Internal\Cryptography\BasicSymmetricCipherBCrypt.cs" />
<Compile Include="$(CommonPath)Internal\Cryptography\BasicSymmetricCipherLiteBCrypt.cs"
@@ -1827,7 +1829,7 @@
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Thread" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier' != 'Browser'">
<Reference Include="System.Console" Condition="'$(Configuration)' == 'Debug'" />
</ItemGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj b/src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj
index dafa4adb4bf..0f028bf8d14 100644
--- a/src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj
+++ b/src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj
@@ -6,8 +6,10 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EnableDllImportGenerator>true</EnableDllImportGenerator>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <UseAndroidCrypto Condition="'$(TargetsAndroid)' == 'true'">true</UseAndroidCrypto>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <UseAndroidCrypto Condition="'$(TargetPlatformIdentifier)' == 'Android'">true</UseAndroidCrypto>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)System\IO\ConnectedStreams.cs"
@@ -274,11 +276,11 @@
<Compile Include="TripleDesTests.cs" />
<Compile Include="ZeroMemoryTests.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="DefaultECDsaProvider.Windows.cs" />
<Compile Include="DefaultECDiffieHellmanProvider.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="('$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true') and '$(UseAndroidCrypto)' != 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'windows' and '$(UseAndroidCrypto)' != 'true'">
<Compile Include="DefaultECDsaProvider.Unix.cs" />
<Compile Include="DefaultECDiffieHellmanProvider.Unix.cs" />
<Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
diff --git a/src/libraries/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj b/src/libraries/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj
index b95e5766e1b..ad4d8340d67 100644
--- a/src/libraries/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj
+++ b/src/libraries/System.Security.Permissions/tests/System.Security.Permissions.Tests.csproj
@@ -20,7 +20,7 @@
<Compile Include="SecurityElementTests.cs" />
<Compile Include="TrustManagerContextTests.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup>
<Compile Include="XamlLoadPermissionTests.cs"/>
</ItemGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.csproj b/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.csproj
index 955e29d0da1..51a48de7604 100644
--- a/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.csproj
+++ b/src/libraries/System.Security.Principal.Windows/ref/System.Security.Principal.Windows.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Principal.Windows/src/System.Security.Principal.Windows.csproj b/src/libraries/System.Security.Principal.Windows/src/System.Security.Principal.Windows.csproj
index f99bbc68881..e1b2637e086 100644
--- a/src/libraries/System.Security.Principal.Windows/src/System.Security.Principal.Windows.csproj
+++ b/src/libraries/System.Security.Principal.Windows/src/System.Security.Principal.Windows.csproj
@@ -1,19 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
- <PropertyGroup Condition="'$(TargetsWindows)' != 'true'">
- <GeneratePlatformNotSupportedAssemblyMessage>SR.PlatformNotSupported_Principal</GeneratePlatformNotSupportedAssemblyMessage>
+ <PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_Principal</GeneratePlatformNotSupportedAssemblyMessage>
<!-- Work around 'notsupported.cs' source generation of explicit interface implementations issue -->
<!-- https://github.com/dotnet/arcade/issues/4722 -->
- <Nullable>annotations</Nullable>
+ <Nullable Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' != ''">annotations</Nullable>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="Microsoft\Win32\SafeHandles\SafeAccessTokenHandle.cs" />
<Compile Include="System\Security\Principal\IdentityNotMappedException.cs" />
<Compile Include="System\Security\Principal\IdentityReference.cs" />
diff --git a/src/libraries/System.Security.Principal/ref/System.Security.Principal.csproj b/src/libraries/System.Security.Principal/ref/System.Security.Principal.csproj
index 06941c80cb7..94f0959b038 100644
--- a/src/libraries/System.Security.Principal/ref/System.Security.Principal.csproj
+++ b/src/libraries/System.Security.Principal/ref/System.Security.Principal.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.Principal/src/System.Security.Principal.csproj b/src/libraries/System.Security.Principal/src/System.Security.Principal.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Security.Principal/src/System.Security.Principal.csproj
+++ b/src/libraries/System.Security.Principal/src/System.Security.Principal.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.SecureString/ref/System.Security.SecureString.csproj b/src/libraries/System.Security.SecureString/ref/System.Security.SecureString.csproj
index 38d76bbb612..69f78b5ef86 100644
--- a/src/libraries/System.Security.SecureString/ref/System.Security.SecureString.csproj
+++ b/src/libraries/System.Security.SecureString/ref/System.Security.SecureString.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Security.SecureString/src/System.Security.SecureString.csproj b/src/libraries/System.Security.SecureString/src/System.Security.SecureString.csproj
index c1ef027e6f6..817af0da465 100644
--- a/src/libraries/System.Security.SecureString/src/System.Security.SecureString.csproj
+++ b/src/libraries/System.Security.SecureString/src/System.Security.SecureString.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ServiceProcess.ServiceController/src/System.ServiceProcess.ServiceController.csproj b/src/libraries/System.ServiceProcess.ServiceController/src/System.ServiceProcess.ServiceController.csproj
index 4ee87fe36d3..44fc5893c98 100644
--- a/src/libraries/System.ServiceProcess.ServiceController/src/System.ServiceProcess.ServiceController.csproj
+++ b/src/libraries/System.ServiceProcess.ServiceController/src/System.ServiceProcess.ServiceController.csproj
@@ -14,13 +14,14 @@ System.ServiceProcess.ServiceType</PackageDescription>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
<OmitResources Condition="'$(IsPartialFacadeAssembly)' == 'true'">true</OmitResources>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_ServiceController</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_ServiceController</GeneratePlatformNotSupportedAssemblyMessage>
<!-- we cannot add API on .NETStandard since it would be absent on .NETFramework, suppress warnings that require API changes -->
<NoWarn Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETStandard'">$(NoWarn);CA1066</NoWarn>
</PropertyGroup>
- <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)System\Text\ValueStringBuilder.cs"
Link="Common\System\Text\ValueStringBuilder.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
diff --git a/src/libraries/System.Speech/src/System.Speech.csproj b/src/libraries/System.Speech/src/System.Speech.csproj
index 7003b449eff..8e92c747dd7 100644
--- a/src/libraries/System.Speech/src/System.Speech.csproj
+++ b/src/libraries/System.Speech/src/System.Speech.csproj
@@ -17,12 +17,14 @@ Commonly Used Types
System.Speech.Synthesis.SpeechSynthesizer
System.Speech.Recognition.SpeechRecognizer</PackageDescription>
</PropertyGroup>
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<!-- System.Speech has its own SR scheme in which resource ID's are mapped to SAPI error codes. So we disable our default SR.cs generation and include resources explicitly -->
- <OmitResources Condition="'$(TargetsWindows)' == 'true'">true</OmitResources>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_SystemSpeech</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_SystemSpeech</GeneratePlatformNotSupportedAssemblyMessage>
+ <OmitResources Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' == ''">true</OmitResources>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="SR.cs" />
<Compile Include="SRID.cs" />
<Compile Include="AudioFormat\AudioFormatConverter.cs" />
@@ -221,11 +223,11 @@ System.Speech.Recognition.SpeechRecognizer</PackageDescription>
<Compile Include="$(CommonPath)Interop\Windows\WinMm\Interop.waveOutWrite.cs"
Link="Common\Interop\Windows\WinMm\Interop.waveOutWrite.cs" />
</ItemGroup>
- <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0')) and '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0-windows'))">
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<EmbeddedResource Include="Resources\Strings.resx">
<Visible>true</Visible>
<ManifestResourceName>ExceptionStringTable</ManifestResourceName>
diff --git a/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj b/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj
index 094f9c43ec7..2dc3052b760 100644
--- a/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj
+++ b/src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj
@@ -44,7 +44,7 @@ System.Text.CodePagesEncodingProvider</PackageDescription>
<Compile Include="System\Text\ISCIIEncoding.cs" />
<Compile Include="System\Text\SBCSCodePageEncoding.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' or '$(TargetFrameworkIdentifier)' == '.NETFramework'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows' or '$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Compile Include="System\Text\CodePagesEncodingProvider.Windows.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
Link="Common\Interop\Windows\Interop.Libraries.cs" />
@@ -57,7 +57,7 @@ System.Text.CodePagesEncodingProvider</PackageDescription>
<Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.WideCharToMultiByte.cs"
Link="Common\Interop\Windows\Kernel32\Interop.WideCharToMultiByte.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework' and '$(TargetsWindows)' != 'true'">
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework' and '$(TargetPlatformIdentifier)' != 'windows'">
<Compile Include="System\Text\CodePagesEncodingProvider.Default.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
diff --git a/src/libraries/System.Text.Encoding.Extensions/ref/System.Text.Encoding.Extensions.csproj b/src/libraries/System.Text.Encoding.Extensions/ref/System.Text.Encoding.Extensions.csproj
index fa92b90a39b..0dcefeb2a12 100644
--- a/src/libraries/System.Text.Encoding.Extensions/ref/System.Text.Encoding.Extensions.csproj
+++ b/src/libraries/System.Text.Encoding.Extensions/ref/System.Text.Encoding.Extensions.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Text.Encoding.Extensions/src/System.Text.Encoding.Extensions.csproj b/src/libraries/System.Text.Encoding.Extensions/src/System.Text.Encoding.Extensions.csproj
index dd3dc2940a5..5ecfe239de6 100644
--- a/src/libraries/System.Text.Encoding.Extensions/src/System.Text.Encoding.Extensions.csproj
+++ b/src/libraries/System.Text.Encoding.Extensions/src/System.Text.Encoding.Extensions.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Text.Encoding/ref/System.Text.Encoding.csproj b/src/libraries/System.Text.Encoding/ref/System.Text.Encoding.csproj
index 7cfd7365e0d..01856a50e84 100644
--- a/src/libraries/System.Text.Encoding/ref/System.Text.Encoding.csproj
+++ b/src/libraries/System.Text.Encoding/ref/System.Text.Encoding.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Text.Encoding/src/System.Text.Encoding.csproj b/src/libraries/System.Text.Encoding/src/System.Text.Encoding.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Text.Encoding/src/System.Text.Encoding.csproj
+++ b/src/libraries/System.Text.Encoding/src/System.Text.Encoding.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj b/src/libraries/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj
index ec39570c09d..75702453c1f 100644
--- a/src/libraries/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj
+++ b/src/libraries/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj
@@ -16,7 +16,8 @@ System.Text.Encodings.Web.JavaScriptEncoder</PackageDescription>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
- <DefineConstants Condition="'$(TargetsBrowser)' == 'true'">$(DefineConstants);TARGET_BROWSER</DefineConstants>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'Browser'">$(DefineConstants);TARGET_BROWSER</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\IO\TextWriterExtensions.cs" />
diff --git a/src/libraries/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj b/src/libraries/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj
index da2080cc5e8..d1b3c292347 100644
--- a/src/libraries/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj
+++ b/src/libraries/System.Text.Encodings.Web/tools/GenDefinedCharList/GenDefinedCharList.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<PropertyGroup>
diff --git a/src/libraries/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj b/src/libraries/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj
index da2080cc5e8..d1b3c292347 100644
--- a/src/libraries/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj
+++ b/src/libraries/System.Text.Encodings.Web/tools/GenUnicodeRanges/GenUnicodeRanges.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<PropertyGroup>
diff --git a/src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.targets b/src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.targets
index 97d78152396..f9e1d021b67 100644
--- a/src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.targets
+++ b/src/libraries/System.Text.Json/gen/System.Text.Json.SourceGeneration.targets
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
- <TargetFrameworks>netstandard2.0</TargetFrameworks>
+ <TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>$(MSBuildThisFileName)</AssemblyName>
<RootNamespace>$(MSBuildThisFileName)</RootNamespace>
<StringResourcesClassName>SR</StringResourcesClassName>
diff --git a/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj b/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj
index e6982a3b83c..51c49cc2e6d 100644
--- a/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj
+++ b/src/libraries/System.Text.RegularExpressions/gen/System.Text.RegularExpressions.Generator.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>netstandard2.0</TargetFrameworks>
+ <TargetFramework>netstandard2.0</TargetFramework>
<EnableDefaultItems>true</EnableDefaultItems>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<UsingToolXliff>true</UsingToolXliff>
diff --git a/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.csproj b/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.csproj
index 9b419147830..1a11a90ac11 100644
--- a/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.csproj
+++ b/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Text.RegularExpressions/src/System.Text.RegularExpressions.csproj b/src/libraries/System.Text.RegularExpressions/src/System.Text.RegularExpressions.csproj
index 0034d373563..641d32f3553 100644
--- a/src/libraries/System.Text.RegularExpressions/src/System.Text.RegularExpressions.csproj
+++ b/src/libraries/System.Text.RegularExpressions/src/System.Text.RegularExpressions.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj b/src/libraries/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj
index 572fbfcb4e6..7c73b994648 100644
--- a/src/libraries/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj
+++ b/src/libraries/System.Threading.AccessControl/src/System.Threading.AccessControl.csproj
@@ -18,10 +18,11 @@ System.Security.AccessControl.SemaphoreSecurity</PackageDescription>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="$(CommonPath)Interop\Windows\Interop.Errors.cs"
Link="Common\Interop\Windows\Interop.Errors.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Interop.BOOL.cs"
diff --git a/src/libraries/System.Threading.Overlapped/ref/System.Threading.Overlapped.csproj b/src/libraries/System.Threading.Overlapped/ref/System.Threading.Overlapped.csproj
index f015797103d..689e572b0d1 100644
--- a/src/libraries/System.Threading.Overlapped/ref/System.Threading.Overlapped.csproj
+++ b/src/libraries/System.Threading.Overlapped/ref/System.Threading.Overlapped.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.Overlapped/src/System.Threading.Overlapped.csproj b/src/libraries/System.Threading.Overlapped/src/System.Threading.Overlapped.csproj
index dd3dc2940a5..5ecfe239de6 100644
--- a/src/libraries/System.Threading.Overlapped/src/System.Threading.Overlapped.csproj
+++ b/src/libraries/System.Threading.Overlapped/src/System.Threading.Overlapped.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj b/src/libraries/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj
index 76e0ee495e8..2a359768071 100644
--- a/src/libraries/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj
+++ b/src/libraries/System.Threading.Tasks.Extensions/ref/System.Threading.Tasks.Extensions.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.Tasks.Extensions/src/System.Threading.Tasks.Extensions.csproj b/src/libraries/System.Threading.Tasks.Extensions/src/System.Threading.Tasks.Extensions.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Threading.Tasks.Extensions/src/System.Threading.Tasks.Extensions.csproj
+++ b/src/libraries/System.Threading.Tasks.Extensions/src/System.Threading.Tasks.Extensions.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.Tasks.Parallel/ref/System.Threading.Tasks.Parallel.csproj b/src/libraries/System.Threading.Tasks.Parallel/ref/System.Threading.Tasks.Parallel.csproj
index aa3558ef5bd..300626789bb 100644
--- a/src/libraries/System.Threading.Tasks.Parallel/ref/System.Threading.Tasks.Parallel.csproj
+++ b/src/libraries/System.Threading.Tasks.Parallel/ref/System.Threading.Tasks.Parallel.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.Tasks.Parallel/src/System.Threading.Tasks.Parallel.csproj b/src/libraries/System.Threading.Tasks.Parallel/src/System.Threading.Tasks.Parallel.csproj
index fc06ab30992..16c2fc66318 100644
--- a/src/libraries/System.Threading.Tasks.Parallel/src/System.Threading.Tasks.Parallel.csproj
+++ b/src/libraries/System.Threading.Tasks.Parallel/src/System.Threading.Tasks.Parallel.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.Tasks/ref/System.Threading.Tasks.csproj b/src/libraries/System.Threading.Tasks/ref/System.Threading.Tasks.csproj
index fd998b62bb8..abb8e0de95b 100644
--- a/src/libraries/System.Threading.Tasks/ref/System.Threading.Tasks.csproj
+++ b/src/libraries/System.Threading.Tasks/ref/System.Threading.Tasks.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.Tasks/src/System.Threading.Tasks.csproj b/src/libraries/System.Threading.Tasks/src/System.Threading.Tasks.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Threading.Tasks/src/System.Threading.Tasks.csproj
+++ b/src/libraries/System.Threading.Tasks/src/System.Threading.Tasks.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.csproj b/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.csproj
index 2ebad89669d..8fd27389155 100644
--- a/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.csproj
+++ b/src/libraries/System.Threading.Thread/ref/System.Threading.Thread.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.Thread/src/System.Threading.Thread.csproj b/src/libraries/System.Threading.Thread/src/System.Threading.Thread.csproj
index dd3dc2940a5..5ecfe239de6 100644
--- a/src/libraries/System.Threading.Thread/src/System.Threading.Thread.csproj
+++ b/src/libraries/System.Threading.Thread/src/System.Threading.Thread.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.ThreadPool/ref/System.Threading.ThreadPool.csproj b/src/libraries/System.Threading.ThreadPool/ref/System.Threading.ThreadPool.csproj
index a86046bb60d..6d53cf798f5 100644
--- a/src/libraries/System.Threading.ThreadPool/ref/System.Threading.ThreadPool.csproj
+++ b/src/libraries/System.Threading.ThreadPool/ref/System.Threading.ThreadPool.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.ThreadPool/src/System.Threading.ThreadPool.csproj b/src/libraries/System.Threading.ThreadPool/src/System.Threading.ThreadPool.csproj
index dd3dc2940a5..5ecfe239de6 100644
--- a/src/libraries/System.Threading.ThreadPool/src/System.Threading.ThreadPool.csproj
+++ b/src/libraries/System.Threading.ThreadPool/src/System.Threading.ThreadPool.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.csproj b/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.csproj
index 398e3eafe32..4ce7799f86a 100644
--- a/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.csproj
+++ b/src/libraries/System.Threading.Timer/ref/System.Threading.Timer.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading.Timer/src/System.Threading.Timer.csproj b/src/libraries/System.Threading.Timer/src/System.Threading.Timer.csproj
index 4f2d15aa3b6..a9c43608342 100644
--- a/src/libraries/System.Threading.Timer/src/System.Threading.Timer.csproj
+++ b/src/libraries/System.Threading.Timer/src/System.Threading.Timer.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading/ref/System.Threading.csproj b/src/libraries/System.Threading/ref/System.Threading.csproj
index 8a140934e7f..a0726a8e926 100644
--- a/src/libraries/System.Threading/ref/System.Threading.csproj
+++ b/src/libraries/System.Threading/ref/System.Threading.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Threading/src/System.Threading.csproj b/src/libraries/System.Threading/src/System.Threading.csproj
index 895b4582793..f4f99d24965 100644
--- a/src/libraries/System.Threading/src/System.Threading.csproj
+++ b/src/libraries/System.Threading/src/System.Threading.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.csproj b/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.csproj
index ce48f9db195..aa7f862958c 100644
--- a/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.csproj
+++ b/src/libraries/System.Transactions.Local/ref/System.Transactions.Local.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Transactions.Local/src/System.Transactions.Local.csproj b/src/libraries/System.Transactions.Local/src/System.Transactions.Local.csproj
index 1715d21528c..8180b39112f 100644
--- a/src/libraries/System.Transactions.Local/src/System.Transactions.Local.csproj
+++ b/src/libraries/System.Transactions.Local/src/System.Transactions.Local.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ValueTuple/ref/System.ValueTuple.csproj b/src/libraries/System.ValueTuple/ref/System.ValueTuple.csproj
index 48439ada9ee..53c1df4d9a3 100644
--- a/src/libraries/System.ValueTuple/ref/System.ValueTuple.csproj
+++ b/src/libraries/System.ValueTuple/ref/System.ValueTuple.csproj
@@ -3,7 +3,7 @@
<!-- Must match version supported by frameworks which support 4.0.* inbox.
Can be removed when API is added and this assembly is versioned to 4.1.* -->
<AssemblyVersion>4.0.3.0</AssemblyVersion>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.ValueTuple/src/System.ValueTuple.csproj b/src/libraries/System.ValueTuple/src/System.ValueTuple.csproj
index 7a4c9970551..c3bdb222673 100644
--- a/src/libraries/System.ValueTuple/src/System.ValueTuple.csproj
+++ b/src/libraries/System.ValueTuple/src/System.ValueTuple.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<!-- rev'ed to 4.0.1.0 even though 4.0.0.0 never shipped so that we can drop pre-release down to beta -->
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Web.HttpUtility/ref/System.Web.HttpUtility.csproj b/src/libraries/System.Web.HttpUtility/ref/System.Web.HttpUtility.csproj
index 0c8fb1555c6..3edccaeb578 100644
--- a/src/libraries/System.Web.HttpUtility/ref/System.Web.HttpUtility.csproj
+++ b/src/libraries/System.Web.HttpUtility/ref/System.Web.HttpUtility.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Web.HttpUtility.cs" />
diff --git a/src/libraries/System.Web.HttpUtility/src/System.Web.HttpUtility.csproj b/src/libraries/System.Web.HttpUtility/src/System.Web.HttpUtility.csproj
index 2b5750a3707..31af47b3b1f 100644
--- a/src/libraries/System.Web.HttpUtility/src/System.Web.HttpUtility.csproj
+++ b/src/libraries/System.Web.HttpUtility/src/System.Web.HttpUtility.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Web\HttpUtility.cs" />
diff --git a/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj b/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj
index b2de19721e3..3eebeafe477 100644
--- a/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj
+++ b/src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj
@@ -12,10 +12,11 @@ System.Security.Cryptography.X509Certificates.X509Certificate2UI
System.Security.Cryptography.X509Certificates.X509SelectionFlag</PackageDescription>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
- <PropertyGroup Condition="'$(TargetsWindows)' != 'true'">
- <GeneratePlatformNotSupportedAssemblyMessage>SR.PlatformNotSupported_System_Windows_Extensions</GeneratePlatformNotSupportedAssemblyMessage>
+ <PropertyGroup>
+ <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_System_Windows_Extensions</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
<Compile Include="TypeForwards.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CERT_CONTEXT.cs"
Link="Common\Interop\Windows\Crypt32\Interop.CERT_CONTEXT.cs" />
@@ -82,7 +83,7 @@ System.Security.Cryptography.X509Certificates.X509SelectionFlag</PackageDescript
<Compile Include="System\Media\SystemSounds.cs" />
<Compile Include="System\Xaml\Permissions\XamlAccessLevel.cs" />
</ItemGroup>
- <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0')) and '$(TargetsAnyOS)' != 'true'">
+ <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0')) and '$(TargetPlatformIdentifier)' != ''">
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
</ItemGroup>
diff --git a/src/libraries/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj b/src/libraries/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj
index fac6e53faf4..310e822d4cf 100644
--- a/src/libraries/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj
+++ b/src/libraries/System.Windows.Extensions/tests/System.Windows.Extensions.Tests.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)-windows</TargetFrameworks>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <ItemGroup>
<Compile Include="X509Certificate2UITests.cs" />
<Compile Include="X509Certificate2UIManualTests.cs" />
<Compile Include="XamlAccessLevelTests.cs" />
diff --git a/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.csproj b/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.csproj
index 7ce26ea71e1..02590842229 100644
--- a/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.csproj
+++ b/src/libraries/System.Xml.ReaderWriter/ref/System.Xml.ReaderWriter.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Xml.ReaderWriter/src/System.Xml.ReaderWriter.csproj b/src/libraries/System.Xml.ReaderWriter/src/System.Xml.ReaderWriter.csproj
index 87b021333ac..43a3ccb9fcc 100644
--- a/src/libraries/System.Xml.ReaderWriter/src/System.Xml.ReaderWriter.csproj
+++ b/src/libraries/System.Xml.ReaderWriter/src/System.Xml.ReaderWriter.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<RootNamespace>System.Xml</RootNamespace>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Xml.XDocument/ref/System.Xml.XDocument.csproj b/src/libraries/System.Xml.XDocument/ref/System.Xml.XDocument.csproj
index e49f7c30e2e..4c769629707 100644
--- a/src/libraries/System.Xml.XDocument/ref/System.Xml.XDocument.csproj
+++ b/src/libraries/System.Xml.XDocument/ref/System.Xml.XDocument.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Xml.XDocument/src/System.Xml.XDocument.csproj b/src/libraries/System.Xml.XDocument/src/System.Xml.XDocument.csproj
index a27331293a2..81fe13f13da 100644
--- a/src/libraries/System.Xml.XDocument/src/System.Xml.XDocument.csproj
+++ b/src/libraries/System.Xml.XDocument/src/System.Xml.XDocument.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<RootNamespace>System.Xml</RootNamespace>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Xml.XPath.XDocument/ref/System.Xml.XPath.XDocument.csproj b/src/libraries/System.Xml.XPath.XDocument/ref/System.Xml.XPath.XDocument.csproj
index 1bc5c5bd1fe..ada222c6f40 100644
--- a/src/libraries/System.Xml.XPath.XDocument/ref/System.Xml.XPath.XDocument.csproj
+++ b/src/libraries/System.Xml.XPath.XDocument/ref/System.Xml.XPath.XDocument.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Xml.XPath.XDocument/src/System.Xml.XPath.XDocument.csproj b/src/libraries/System.Xml.XPath.XDocument/src/System.Xml.XPath.XDocument.csproj
index 456c96962cd..f9101146971 100644
--- a/src/libraries/System.Xml.XPath.XDocument/src/System.Xml.XPath.XDocument.csproj
+++ b/src/libraries/System.Xml.XPath.XDocument/src/System.Xml.XPath.XDocument.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.csproj b/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.csproj
index 6cbf41c40f8..01888d73a15 100644
--- a/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.csproj
+++ b/src/libraries/System.Xml.XPath/ref/System.Xml.XPath.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Xml.XPath/src/System.Xml.XPath.csproj b/src/libraries/System.Xml.XPath/src/System.Xml.XPath.csproj
index a2a87b23e74..d8e7c78820a 100644
--- a/src/libraries/System.Xml.XPath/src/System.Xml.XPath.csproj
+++ b/src/libraries/System.Xml.XPath/src/System.Xml.XPath.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Xml.XmlDocument/ref/System.Xml.XmlDocument.csproj b/src/libraries/System.Xml.XmlDocument/ref/System.Xml.XmlDocument.csproj
index 1844179cd81..b6e90cfde9d 100644
--- a/src/libraries/System.Xml.XmlDocument/ref/System.Xml.XmlDocument.csproj
+++ b/src/libraries/System.Xml.XmlDocument/ref/System.Xml.XmlDocument.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Xml.XmlDocument/src/System.Xml.XmlDocument.csproj b/src/libraries/System.Xml.XmlDocument/src/System.Xml.XmlDocument.csproj
index e6d999dc4c2..a46b8c97768 100644
--- a/src/libraries/System.Xml.XmlDocument/src/System.Xml.XmlDocument.csproj
+++ b/src/libraries/System.Xml.XmlDocument/src/System.Xml.XmlDocument.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Xml.XmlSerializer/ref/System.Xml.XmlSerializer.csproj b/src/libraries/System.Xml.XmlSerializer/ref/System.Xml.XmlSerializer.csproj
index a626176aed7..901bd833ca5 100644
--- a/src/libraries/System.Xml.XmlSerializer/ref/System.Xml.XmlSerializer.csproj
+++ b/src/libraries/System.Xml.XmlSerializer/ref/System.Xml.XmlSerializer.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/System.Xml.XmlSerializer/src/System.Xml.XmlSerializer.csproj b/src/libraries/System.Xml.XmlSerializer/src/System.Xml.XmlSerializer.csproj
index a2a87b23e74..d8e7c78820a 100644
--- a/src/libraries/System.Xml.XmlSerializer/src/System.Xml.XmlSerializer.csproj
+++ b/src/libraries/System.Xml.XmlSerializer/src/System.Xml.XmlSerializer.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/externals.csproj b/src/libraries/externals.csproj
index c04d47d9f89..20eed5139a9 100644
--- a/src/libraries/externals.csproj
+++ b/src/libraries/externals.csproj
@@ -3,7 +3,7 @@
<!-- Set the RuntimeIdentifier so that the DotNetHost and DotNetHostPolicy packages resolve for the corresponding runtime. -->
<RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier>
<SwapNativeForIL Condition="'$(SwapNativeForIL)' == '' and ('$(Configuration)' == 'Debug' or '$(Coverage)' == 'true') and '$(RuntimeFlavor)' != 'Mono'">true</SwapNativeForIL>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<!-- Binplace properties -->
<BinPlaceForTargetVertical>false</BinPlaceForTargetVertical>
<BinPlaceNative>true</BinPlaceNative>
diff --git a/src/libraries/native-binplace.proj b/src/libraries/native-binplace.proj
index 9d9ee882b1f..82427d8f27b 100644
--- a/src/libraries/native-binplace.proj
+++ b/src/libraries/native-binplace.proj
@@ -2,7 +2,6 @@
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<BinPlaceRuntime>false</BinPlaceRuntime>
<BinPlaceNative>true</BinPlaceNative>
diff --git a/src/libraries/pretest.proj b/src/libraries/pretest.proj
index dc879eb62d5..ac410f82866 100644
--- a/src/libraries/pretest.proj
+++ b/src/libraries/pretest.proj
@@ -17,7 +17,7 @@
the targeting and runtimepack before the test runners which consume that asset are built.
-->
<ItemGroup>
- <ExternalsProject Include="externals.csproj" />
+ <ExternalsProject Include="externals.csproj" Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''" />
<ProjectReference Include="@(ExternalsProject)" Condition="'$(MSBuildRestoreSessionId)' != ''" />
<ProjectReference Include="$(CommonTestPath)AppleTestRunner\AppleTestRunner.csproj" Condition="'$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator'"/>
diff --git a/src/libraries/ref.proj b/src/libraries/ref.proj
index e3a63ad2bb8..4d67c2f01c6 100644
--- a/src/libraries/ref.proj
+++ b/src/libraries/ref.proj
@@ -6,6 +6,13 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
+ <PropertyGroup Condition="'$(BuildTargetFramework)' == 'net48'">
+ <TargetFramework>$(BuildTargetFramework)</TargetFramework>
+ <!-- Filter out ProjectReferences which aren't compatible with the above TargetFramework. -->
+ <OmitIncompatibleProjectReferences>true</OmitIncompatibleProjectReferences>
+ <FilterTraversalProjectReferences>true</FilterTraversalProjectReferences>
+ </PropertyGroup>
+
<ItemGroup>
<_allRef Include="$(MSBuildThisFileDirectory)*\ref\*.csproj"
Exclude="@(ProjectExclusions)" />
diff --git a/src/libraries/sendtohelix.proj b/src/libraries/sendtohelix.proj
index f5fd1292fed..3b938a01682 100644
--- a/src/libraries/sendtohelix.proj
+++ b/src/libraries/sendtohelix.proj
@@ -16,12 +16,11 @@
<PropertyGroup>
<BuildTargetFramework Condition="'$(BuildTargetFramework)' == ''">$(NetCoreAppCurrent)</BuildTargetFramework>
- <TargetsWindows Condition="'$(TargetOS)' == 'windows'">true</TargetsWindows>
<!-- Set the name of the scenario file. Note that this is only used in invocations where $(Scenario) is set
(which is when this project is invoked to call the "CreateOneScenarioTestEnvFile" target). -->
- <TestEnvFileName Condition=" '$(TargetsWindows)' == 'true' ">SetStressModes_$(Scenario).cmd</TestEnvFileName>
- <TestEnvFileName Condition=" '$(TargetsWindows)' != 'true' ">SetStressModes_$(Scenario).sh</TestEnvFileName>
+ <TestEnvFileName Condition=" '$(TargetOS)' == 'windows' ">SetStressModes_$(Scenario).cmd</TestEnvFileName>
+ <TestEnvFileName Condition=" '$(TargetOS)' != 'windows' ">SetStressModes_$(Scenario).sh</TestEnvFileName>
</PropertyGroup>
@@ -117,11 +116,12 @@
<PropertyGroup>
<TestEnvFilePath>$(NetCoreAppCurrentTestHostPath)$(TestEnvFileName)</TestEnvFilePath>
+ <_targetsWindows Condition="'$(TargetOS)' == 'windows'">true</_targetsWindows>
</PropertyGroup>
<ItemGroup>
<_ProjectsToBuild Include="$(RepoRoot)\src\tests\Common\testenvironment.proj">
- <Properties>Scenario=$(Scenario);TestEnvFileName=$(TestEnvFilePath);TargetsWindows=$(TargetsWindows)</Properties>
+ <Properties>Scenario=$(Scenario);TestEnvFileName=$(TestEnvFilePath);TargetsWindows=$(_targetsWindows)</Properties>
</_ProjectsToBuild>
</ItemGroup>
@@ -156,8 +156,8 @@
<_RuntimeInput Include="$(NetCoreAppCurrentTestHostPath)**\*.dll" />
<!-- Add the scenario TestEnv batch files -->
- <_RuntimeInput Condition=" '$(Scenarios)' != '' and '$(TargetsWindows)' == 'true' " Include="$(NetCoreAppCurrentTestHostPath)**\*.cmd" />
- <_RuntimeInput Condition=" '$(Scenarios)' != '' and '$(TargetsWindows)' != 'true' " Include="$(NetCoreAppCurrentTestHostPath)**\*.sh" />
+ <_RuntimeInput Condition="'$(Scenarios)' != '' and '$(TargetOS)' == 'windows'" Include="$(NetCoreAppCurrentTestHostPath)**\*.cmd" />
+ <_RuntimeInput Condition="'$(Scenarios)' != '' and '$(TargetOS)' != 'windows'" Include="$(NetCoreAppCurrentTestHostPath)**\*.sh" />
</ItemGroup>
</Target>
diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj
index 3875c28fdf3..53a700a1eb2 100644
--- a/src/libraries/sendtohelixhelp.proj
+++ b/src/libraries/sendtohelixhelp.proj
@@ -6,8 +6,7 @@
-->
<PropertyGroup>
- <TargetsWindows Condition="'$(TargetOS)' == 'windows'">true</TargetsWindows>
- <WindowsShell Condition="'$(TargetsWindows)' == 'true' or '$(BrowserHost)' == 'windows'">true</WindowsShell>
+ <WindowsShell Condition="'$(TargetOS)' == 'windows' or '$(BrowserHost)' == 'windows'">true</WindowsShell>
<!-- Set Helix build to build number if available -->
<HelixBuild Condition="'$(HelixBuild)' == ''">$(BUILD_BUILDNUMBER)</HelixBuild>
@@ -98,15 +97,15 @@
(which is when this project is invoked to call the "CreateTestEnvFile" target).
-->
<TestEnvFileName></TestEnvFileName>
- <TestEnvFileName Condition=" '$(Scenario)' != '' and '$(TargetsWindows)' == 'true'">SetStressModes_$(Scenario).cmd</TestEnvFileName>
- <TestEnvFileName Condition=" '$(Scenario)' != '' and '$(TargetsWindows)' != 'true' and '$(TargetOS)' != 'Browser'">SetStressModes_$(Scenario).sh</TestEnvFileName>
+ <TestEnvFileName Condition=" '$(Scenario)' != '' and '$(TargetOS)' == 'windows'">SetStressModes_$(Scenario).cmd</TestEnvFileName>
+ <TestEnvFileName Condition=" '$(Scenario)' != '' and '$(TargetOS)' != 'windows' and '$(TargetOS)' != 'Browser'">SetStressModes_$(Scenario).sh</TestEnvFileName>
</PropertyGroup>
<!-- HelixPreCommands is a set of commands run before the work item command. We use it here to inject
setting up the per-scenario environment.
-->
- <ItemGroup Condition=" '$(TestEnvFileName)' != '' and '$(TargetsWindows)' == 'true' ">
+ <ItemGroup Condition=" '$(TestEnvFileName)' != '' and '$(TargetOS)' == 'windows' ">
<HelixPreCommand Include="set __TestEnv=%HELIX_CORRELATION_PAYLOAD%\$(TestEnvFileName)" />
<HelixPreCommand Include="type %__TestEnv%" />
<HelixPreCommand Include="call %__TestEnv%" />
@@ -114,7 +113,7 @@
<HelixPreCommand Include="set COMPlus" />
</ItemGroup>
- <ItemGroup Condition=" '$(TestEnvFileName)' != '' and '$(TargetsWindows)' != 'true' ">
+ <ItemGroup Condition=" '$(TestEnvFileName)' != '' and '$(TargetOS)' != 'windows' ">
<HelixPreCommand Include="export __TestEnv=$HELIX_CORRELATION_PAYLOAD/$(TestEnvFileName)" />
<HelixPreCommand Include="cat $__TestEnv" />
<HelixPreCommand Include=". $__TestEnv" /> <!-- Use "." not "source"; some clients appear to run scripts with "sh" not "bash" -->
@@ -213,11 +212,11 @@
<Message Importance="High" Text="Using Timeout: $(_workItemTimeout)" />
<PropertyGroup Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(BUILD_BUILDID)' != ''">
- <HelixPostCommands Condition="'$(TargetsWindows)' == 'true'">
+ <HelixPostCommands Condition="'$(TargetOS)' == 'windows'">
$(HelixPostCommands);
%HELIX_PYTHONPATH% %HELIX_CORRELATION_PAYLOAD%\gen-debug-dump-docs.py -buildid $(BUILD_BUILDID) -workitem %HELIX_WORKITEM_FRIENDLYNAME% -jobid %HELIX_CORRELATION_ID% -outdir %HELIX_WORKITEM_UPLOAD_ROOT% -templatedir %HELIX_CORRELATION_PAYLOAD% -dumpdir %HELIX_DUMP_FOLDER% -productver $(ProductVersion)
</HelixPostCommands>
- <HelixPostCommands Condition="'$(TargetsWindows)' != 'true'">
+ <HelixPostCommands Condition="'$(TargetOS)' != 'windows'">
$(HelixPostCommands);
$HELIX_PYTHONPATH $HELIX_CORRELATION_PAYLOAD/gen-debug-dump-docs.py -buildid $(BUILD_BUILDID) -workitem $HELIX_WORKITEM_FRIENDLYNAME -jobid $HELIX_CORRELATION_ID -outdir $HELIX_WORKITEM_UPLOAD_ROOT -templatedir $HELIX_CORRELATION_PAYLOAD -dumpdir $HELIX_DUMP_FOLDER -productver $(ProductVersion)
</HelixPostCommands>
diff --git a/src/libraries/shims/generated/Directory.Build.props b/src/libraries/shims/generated/Directory.Build.props
index 6b2ab04d6ac..4694448ae16 100644
--- a/src/libraries/shims/generated/Directory.Build.props
+++ b/src/libraries/shims/generated/Directory.Build.props
@@ -11,7 +11,7 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<!-- System.Data.SqlClient is not live built anymore, reference it manually. -->
diff --git a/src/libraries/shims/manual/Directory.Build.props b/src/libraries/shims/manual/Directory.Build.props
index e5f08175e8c..d2bb299a05e 100644
--- a/src/libraries/shims/manual/Directory.Build.props
+++ b/src/libraries/shims/manual/Directory.Build.props
@@ -12,7 +12,7 @@
<PropertyGroup>
<IsRuntimeAssembly>true</IsRuntimeAssembly>
- <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/src.proj b/src/libraries/src.proj
index 4e0fea066f7..35479848aae 100644
--- a/src/libraries/src.proj
+++ b/src/libraries/src.proj
@@ -4,6 +4,13 @@
<TraversalGlobalProperties>BuildAllProjects=true</TraversalGlobalProperties>
</PropertyGroup>
+ <PropertyGroup Condition="'$(BuildTargetFramework)' == 'net48'">
+ <TargetFramework>$(BuildTargetFramework)</TargetFramework>
+ <!-- Filter out ProjectReferences which aren't compatible with the above TargetFramework. -->
+ <OmitIncompatibleProjectReferences>true</OmitIncompatibleProjectReferences>
+ <FilterTraversalProjectReferences>true</FilterTraversalProjectReferences>
+ </PropertyGroup>
+
<ItemGroup>
<_allSrc Include="$(MSBuildThisFileDirectory)*\src\*.*proj"
Exclude="@(ProjectExclusions);
@@ -33,7 +40,7 @@
<NetCoreAppProject Include="$(CoreLibProject);
@(_allSrc)"
Exclude="@(NonNetCoreAppProject)" />
- <ManualShimProject Include="shims\manual\*.csproj" />
+ <ManualShimProject Include="shims\manual\*.csproj" Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''" />
<ApiCompatProject Include="shims\ApiCompat.proj"
Condition="'$(DotNetBuildFromSource)' != 'true' and
('$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == '') and