From a5d5b91672c79bf12b8642d6d0aee026f05af99d Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 14 Jun 2019 15:12:42 +0200 Subject: [PATCH] Delete dead uapaot code (dotnet/corefx#38330) * Delete dead uapaot code Commit migrated from https://github.com/dotnet/corefx/commit/8c2be7893fa585cba9c094c27b69d7c8e0822ef3 --- .../architecture/net-core-applications.md | 2 +- .../coding-guidelines/project-guidelines.md | 3 +- docs/libraries/project-docs/porting.md | 6 +- docs/libraries/project-docs/public-signing.md | 2 +- .../support-dotnet-core-instructions.md | 6 - .../CompilerServices/RemovableFeatureAttribute.cs | 28 -- .../ref/CoreFx.Private.TestUtilities.cs | 3 - .../src/CoreFx.Private.TestUtilities.csproj | 3 - .../src/System/AssertExtensions.cs | 20 +- .../src/System/PlatformDetection.cs | 16 +- .../Microsoft.CSharp/src/Microsoft.CSharp.csproj | 3 - .../tests/Microsoft.VisualBasic.Core.Tests.csproj | 3 - .../tests/Microsoft.Win32.Primitives.Tests.csproj | 3 - .../System.Collections.Immutable.Tests.csproj | 3 - .../System.Collections.Specialized.Tests.csproj | 3 - .../tests/System.Collections.Tests.csproj | 3 - .../src/System.ComponentModel.Annotations.csproj | 3 - .../src/System.ComponentModel.TypeConverter.csproj | 3 - ...ystem.Configuration.ConfigurationManager.csproj | 4 - .../tests/Mono/ConfigurationLockCollectionTest.cs | 16 +- .../tests/Mono/ConfigurationManagerTest.cs | 20 +- .../Configuration/ApplicationSettingsBaseTests.cs | 32 +- .../Configuration/ImplicitMachineConfigTests.cs | 2 +- .../LocalFileSettingsProviderTests.cs | 4 +- .../src/MatchingRefApiCompatBaseline.uapaot.txt | 2 - .../src/System.Data.Common.csproj | 8 - .../System/Data/Common/DataCommonEventSource.cs | 123 +----- .../src/System/Data/SQLTypes/SqlXml.cs | 8 - .../tests/System.Data.Common.Tests.csproj | 3 - .../System/Data/Common/DataCommonEventSource.cs | 104 +---- .../src/System.Diagnostics.DiagnosticSource.csproj | 1 - .../tests/System.Diagnostics.Process.Tests.csproj | 2 +- .../src/System.Diagnostics.StackTrace.csproj | 9 +- ...raceSymbols.CoreCLR.cs => StackTraceSymbols.cs} | 0 .../tests/System.Diagnostics.Tracing.Tests.csproj | 3 - .../tests/System.Dynamic.Runtime.Tests.csproj | 3 - .../System.Globalization.Calendars.Tests.csproj | 3 - .../System.Globalization.Extensions.Tests.csproj | 1 - .../src/System.IO.FileSystem.csproj | 2 +- .../tests/System.IO.FileSystem.Tests.csproj | 3 - .../System.IO/tests/System.IO.Tests.csproj | 3 - .../src/System.Linq.Expressions.csproj | 11 +- .../tests/System.Linq.Queryable.Tests.csproj | 3 - .../System.Linq/tests/System.Linq.Tests.csproj | 3 - .../System.Memory/src/ApiCompatBaseline.uapaot.txt | 37 -- .../System.Memory/tests/System.Memory.Tests.csproj | 3 - .../tests/System.Net.HttpListener.Tests.csproj | 3 - .../src/System.Net.Primitives.csproj | 3 - .../System.Net.Primitives.Functional.Tests.csproj | 3 - .../src/System.Net.Sockets.csproj | 2 +- .../System.Net.Sockets.Tests.csproj | 3 - ...System.Private.DataContractSerialization.csproj | 14 +- .../Runtime/Serialization/ClassDataContract.cs | 73 +--- .../System/Runtime/Serialization/CodeGenerator.cs | 12 +- .../Serialization/CollectionDataContract.cs | 66 +-- .../System/Runtime/Serialization/DataContract.cs | 112 +---- .../Serialization/DataContractSerializer.cs | 14 - .../src/System/Runtime/Serialization/DataMember.cs | 4 - .../Runtime/Serialization/EnumDataContract.cs | 4 - .../Runtime/Serialization/ExtensionDataObject.cs | 8 +- .../Runtime/Serialization/ExtensionDataReader.cs | 4 +- .../src/System/Runtime/Serialization/Globals.cs | 17 - .../Serialization/Json/JsonClassDataContract.cs | 34 -- .../Json/JsonCollectionDataContract.cs | 51 --- .../Runtime/Serialization/Json/JsonDataContract.cs | 13 - .../Json/JsonFormatReaderGenerator.cs | 9 - .../Json/JsonFormatWriterGenerator.cs | 8 - .../XmlObjectSerializerReadContextComplexJson.cs | 6 - .../XmlObjectSerializerWriteContextComplexJson.cs | 4 - .../Serialization/KnownTypeDataContractResolver.cs | 2 +- .../Runtime/Serialization/PrimitiveDataContract.cs | 196 --------- .../Runtime/Serialization/SerializationMode.cs | 5 +- .../Runtime/Serialization/XmlDataContract.cs | 30 -- .../Serialization/XmlFormatGeneratorStatics.cs | 2 - .../Serialization/XmlFormatReaderGenerator.cs | 45 +- .../Serialization/XmlFormatWriterGenerator.cs | 28 +- .../Serialization/XmlObjectSerializerContext.cs | 8 +- .../XmlObjectSerializerReadContext.cs | 48 +-- .../XmlObjectSerializerReadContextComplex.cs | 4 - .../XmlObjectSerializerWriteContext.cs | 38 +- .../XmlObjectSerializerWriteContextComplex.cs | 38 +- .../Runtime/Serialization/XmlReaderDelegator.cs | 2 +- .../Runtime/Serialization/XmlWriterDelegator.cs | 2 +- .../System.Private.Reflection.Metadata.Ecma335.sln | 6 - ...stem.Private.Reflection.Metadata.Ecma335.csproj | 1 - .../src/System.Private.Uri.csproj | 3 - .../events/System.Xml.Linq.Events.Tests.csproj | 3 - .../src/System.Private.Xml.csproj | 7 +- .../src/System/Xml/Core/XmlReader.cs | 4 - .../src/System/Xml/Serialization/CodeGenerator.cs | 2 - .../src/System/Xml/Serialization/Compilation.cs | 6 - .../src/System/Xml/Serialization/Compiler.cs | 2 - .../ReflectionXmlSerializationReader.cs | 3 +- .../src/System/Xml/Serialization/SourceInfo.cs | 2 - .../src/System/Xml/Serialization/Types.cs | 2 - .../Serialization/XmlSerializationGeneratedCode.cs | 2 - .../Xml/Serialization/XmlSerializationILGen.cs | 4 +- .../Xml/Serialization/XmlSerializationReader.cs | 34 -- .../Serialization/XmlSerializationReaderILGen.cs | 2 - .../Xml/Serialization/XmlSerializationWriter.cs | 15 - .../Serialization/XmlSerializationWriterILGen.cs | 2 - .../src/System/Xml/Serialization/XmlSerializer.cs | 142 ------- .../src/System/Xml/Serialization/indentedWriter.cs | 2 - .../src/System/Xml/XmlDownloadManager.cs | 3 - ...m.Xml.XmlSerializer.ReflectionOnly.Tests.csproj | 3 - .../System.Xml.XmlSerializer.Tests.csproj | 3 - .../src/ApiCompatBaseline.uapaot.txt | 5 - .../src/System.Reflection.TypeExtensions.csproj | 2 +- ...mberInfoTests.CoreCLR.cs => MemberInfoTests.cs} | 0 .../{ModuleTests.CoreCLR.cs => ModuleTests.cs} | 0 ....Reflection.TypeExtensions.CoreCLR.Tests.csproj | 7 +- .../src/ApiCompatBaseline.uapaot.txt | 6 - .../System.Reflection/tests/AssemblyNameTests.cs | 13 +- .../System.Reflection/tests/AssemblyTests.cs | 18 +- .../{AssemblyTests.CoreCLR.cs => AssemblyTests.cs} | 0 .../CoreCLR/System.Reflection.CoreCLR.Tests.csproj | 2 +- .../System.Runtime.CompilerServices.VisualC.csproj | 2 +- .../src/ApiCompatBaseline.uapaot.txt | 8 - .../src/System.Runtime.Extensions.csproj | 8 +- ...ntime.InteropServices.RuntimeInformation.csproj | 2 +- .../RuntimeInformation.Windows.cs | 2 +- .../RuntimeInformation/RuntimeInformation.cs | 5 - ...m.Runtime.InteropServices.WindowsRuntime.csproj | 1 - .../src/ApiCompatBaseline.uapaot.txt | 21 - .../src/System.Runtime.InteropServices.csproj | 28 +- .../InteropServices/Marshal/BindToMonikerTests.cs | 2 +- .../Marshal/ChangeWrapperHandleStrengthTests.cs | 4 +- .../src/ApiCompatBaseline.uapaot.txt | 35 -- .../src/System.Runtime.Loader.csproj | 1 - .../System.Runtime.Serialization.Formatters.csproj | 3 - ...m.Runtime.Serialization.Formatters.Tests.csproj | 3 - .../tests/DataContractJsonSerializer.CoreCLR.cs | 20 - .../tests/DataContractJsonSerializer.cs | 8 + ....Serialization.Json.ReflectionOnly.Tests.csproj | 5 - .../System.Runtime.Serialization.Json.Tests.csproj | 2 - .../System.Runtime.Serialization.Primitives.csproj | 3 - .../tests/DataContractSerializer.CoreCLR.cs | 20 - .../tests/DataContractSerializer.cs | 8 + ...e.Serialization.Xml.ReflectionOnly.Tests.csproj | 5 - .../tests/SerializationTypes.CoreCLR.cs | 22 - .../tests/SerializationTypes.cs | 12 + .../System.Runtime.Serialization.Xml.Tests.csproj | 5 - .../System.Runtime.WindowsRuntime.UI.Xaml.csproj | 3 - .../src/System.Runtime.WindowsRuntime.csproj | 91 ++-- .../IO/StreamOperationAsyncResult.CoreCLR.cs | 17 - .../System/IO/StreamOperationAsyncResult.CoreRT.cs | 17 - .../src/System/IO/StreamOperationAsyncResult.cs | 6 + .../src/System/InternalHelpers.CoreRT.cs | 16 - ...ternalHelpers.CoreCLR.cs => InternalHelpers.cs} | 0 .../Tasks/AsyncInfoToTaskBridge.CoreRT.cs | 244 ----------- ...kBridge.CoreCLR.cs => AsyncInfoToTaskBridge.cs} | 0 .../WindowsRuntimeSystemExtensions.CoreRT.cs | 468 --------------------- ...oreCLR.cs => WindowsRuntimeSystemExtensions.cs} | 0 .../System.Runtime.WindowsRuntime.Tests.csproj | 3 - .../src/ApiCompatBaseline.uapaot.txt | 18 - .../System.Runtime/src/System.Runtime.csproj | 1 - .../tests/System.Runtime.Tests.csproj | 3 - .../tests/System/EnumTests.netcoreapp.cs | 2 - .../RuntimeFeatureTests.netcoreapp.cs | 2 +- .../System.Security.AccessControl.Tests.csproj | 3 - ...m.Security.Cryptography.Algorithms.Tests.csproj | 3 - .../System.Security.Cryptography.Cng.Tests.csproj | 3 - .../src/System.Security.Cryptography.Xml.csproj | 3 - .../tests/System.Security.Permissions.Tests.csproj | 3 - .../tests/System.Text.Encodings.Web.Tests.csproj | 1 - .../tests/RegexCompilationHelper.cs | 2 +- .../src/System.Threading.Overlapped.csproj | 1 - .../src/System.Threading.Tasks.Dataflow.csproj | 2 - .../src/ApiCompatBaseline.uapaot.txt | 4 - .../src/ApiCompatBaseline.uapaot.txt | 2 - .../tests/System.Transactions.Local.Tests.csproj | 3 - .../ref/System.Xml.XDocument.Manual.cs | 16 - .../ref/System.Xml.XDocument.csproj | 1 - .../src/MatchingRefApiCompatBaseline.uapaot.txt | 7 - src/libraries/pkg/descriptions.json | 5 - .../shims/ApiCompatBaseline.uapaot.netstandard.txt | 150 ------- .../ApiCompatBaseline.uapaot.netstandardOnly.txt | 131 ------ 177 files changed, 231 insertions(+), 2982 deletions(-) delete mode 100644 src/libraries/Common/src/System/Runtime/CompilerServices/RemovableFeatureAttribute.cs delete mode 100644 src/libraries/System.Data.Common/src/MatchingRefApiCompatBaseline.uapaot.txt rename src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/{StackTraceSymbols.CoreCLR.cs => StackTraceSymbols.cs} (100%) delete mode 100644 src/libraries/System.Memory/src/ApiCompatBaseline.uapaot.txt delete mode 100644 src/libraries/System.Reflection.Primitives/src/ApiCompatBaseline.uapaot.txt rename src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/{MemberInfoTests.CoreCLR.cs => MemberInfoTests.cs} (100%) rename src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/{ModuleTests.CoreCLR.cs => ModuleTests.cs} (100%) delete mode 100644 src/libraries/System.Reflection/src/ApiCompatBaseline.uapaot.txt rename src/libraries/System.Reflection/tests/CoreCLR/{AssemblyTests.CoreCLR.cs => AssemblyTests.cs} (100%) delete mode 100644 src/libraries/System.Runtime.Extensions/src/ApiCompatBaseline.uapaot.txt delete mode 100644 src/libraries/System.Runtime.InteropServices/src/ApiCompatBaseline.uapaot.txt delete mode 100644 src/libraries/System.Runtime.Loader/src/ApiCompatBaseline.uapaot.txt delete mode 100644 src/libraries/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.CoreCLR.cs delete mode 100644 src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.CoreCLR.cs delete mode 100644 src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.CoreCLR.cs delete mode 100644 src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.CoreCLR.cs delete mode 100644 src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.CoreRT.cs delete mode 100644 src/libraries/System.Runtime.WindowsRuntime/src/System/InternalHelpers.CoreRT.cs rename src/libraries/System.Runtime.WindowsRuntime/src/System/{InternalHelpers.CoreCLR.cs => InternalHelpers.cs} (100%) delete mode 100644 src/libraries/System.Runtime.WindowsRuntime/src/System/Threading/Tasks/AsyncInfoToTaskBridge.CoreRT.cs rename src/libraries/System.Runtime.WindowsRuntime/src/System/Threading/Tasks/{AsyncInfoToTaskBridge.CoreCLR.cs => AsyncInfoToTaskBridge.cs} (100%) delete mode 100644 src/libraries/System.Runtime.WindowsRuntime/src/System/WindowsRuntimeSystemExtensions.CoreRT.cs rename src/libraries/System.Runtime.WindowsRuntime/src/System/{WindowsRuntimeSystemExtensions.CoreCLR.cs => WindowsRuntimeSystemExtensions.cs} (100%) delete mode 100644 src/libraries/System.Runtime/src/ApiCompatBaseline.uapaot.txt delete mode 100644 src/libraries/System.Threading.ThreadPool/src/ApiCompatBaseline.uapaot.txt delete mode 100644 src/libraries/System.Threading/src/ApiCompatBaseline.uapaot.txt delete mode 100644 src/libraries/System.Xml.XDocument/ref/System.Xml.XDocument.Manual.cs delete mode 100644 src/libraries/System.Xml.XmlSerializer/src/MatchingRefApiCompatBaseline.uapaot.txt delete mode 100644 src/libraries/shims/ApiCompatBaseline.uapaot.netstandard.txt delete mode 100644 src/libraries/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt diff --git a/docs/libraries/architecture/net-core-applications.md b/docs/libraries/architecture/net-core-applications.md index a2c0a27..3cb9588 100644 --- a/docs/libraries/architecture/net-core-applications.md +++ b/docs/libraries/architecture/net-core-applications.md @@ -13,7 +13,7 @@ NETStandard version supported | `netstandard2.0` ## FAQ **Q: What is a .NET Core application?** -**A:** A .NET Core application is an application that can run on any .NET Core runtime: CoreCLR (current), .NETNative (future). It can run on one of many .NET core platforms (Windows, OSX, Linux). It relies on the host provided by the given runtime. It's a composable framework built from the packages on which the application depends. Its assembly loading policy permits newer versions of dependencies without any application configuration (e.g.: BindingRedirects are not required). +**A:** A .NET Core application is an application that can run on any .NET Core runtime: CoreCLR (current), Mono (future). It can run on one of many .NET core platforms (Windows, OSX, Linux). It relies on the host provided by the given runtime. It's a composable framework built from the packages on which the application depends. Its assembly loading policy permits newer versions of dependencies without any application configuration (e.g.: BindingRedirects are not required). **Q: Can I share source between a .NET Core application, and other target frameworks?** **A:** Yes. Most of the API supported by .NET Core application is also part of .NET Standard. That source could be compiled as a .NET Standard library and shared with a .NET Core application and a .NET Framework application as a binary. Alternatively, the source could be shared and cross-compiled between a .NET Core application and a .NET Framework application. diff --git a/docs/libraries/coding-guidelines/project-guidelines.md b/docs/libraries/coding-guidelines/project-guidelines.md index 4d754d2..2ea0b6c 100644 --- a/docs/libraries/coding-guidelines/project-guidelines.md +++ b/docs/libraries/coding-guidelines/project-guidelines.md @@ -32,7 +32,7 @@ once before you can iterate and work on a given library project. Below is a list of all the various options we pivot the project builds on: - **Target Frameworks:** NetFx (aka Desktop), netstandard (aka dotnet/Portable), NETCoreApp (aka .NET Core), UAP (aka UWP/Store/netcore50) -- **Platform Runtimes:** NetFx (aka CLR/Desktop), CoreCLR, CoreRT (aka NetNative/AOT/MRT) +- **Platform Runtimes:** NetFx (aka CLR/Desktop), CoreCLR, Mono - **OS:** Windows_NT, Linux, OSX, FreeBSD, AnyOS - **Flavor:** Debug, Release - **Architecture:** x86, x64, arm, arm64, AnyCPU @@ -245,7 +245,6 @@ Each source file should use the following guidelines - Classes that are forked based on a feature set should have file names `..cs`. - Where `` is the name of something that causes a fork in code that isn't a single configuration. Examples: - `.CoreCLR.cs` - implementation specific to CoreCLR runtime - - `.CoreRT.cs` - implementation specific to CoreRT runtime - `.Win32.cs` - implementation based on [Win32](https://en.wikipedia.org/wiki/Windows_API) - `.WinRT.cs` - implementation based on [WinRT](https://en.wikipedia.org/wiki/Windows_Runtime) - `.Uap.cs` - implementation specific to UAP, also known as [UWP](https://en.wikipedia.org/wiki/Universal_Windows_Platform) diff --git a/docs/libraries/project-docs/porting.md b/docs/libraries/project-docs/porting.md index b04e4b3..eabe7ce 100644 --- a/docs/libraries/project-docs/porting.md +++ b/docs/libraries/project-docs/porting.md @@ -85,11 +85,11 @@ Security Transparency | [Details](#security-transparency) ### App Domains -**Justification**. AppDomains require runtime support and are generally quite expensive. They are not implemented in .NET Core or .NET Native. We do not plan on adding this capability in future. +**Justification**. AppDomains require runtime support and are generally quite expensive. They are not implemented in .NET Core. We do not plan on adding this capability in future. **Replacement**. AppDomains were used for different features; for isolation we recommend processes and/or containers. For dynamic loading, we provide `AssemblyLoadContext`. Information (such as the name and base directory) is provided by APIs on other types, for instance `AppContext.BaseDirectory`. Some scenarios, such as getting the list of loaded assemblies are unsupported as they are inherently fragile. -To make code migration from .NET Framework easier, we have exposed some of the `AppDomain` API surface in .NET Core and .NET Native. Some of the APIs work fine (e.g. `UnhandledException`), some of them do nothing (e.g. `SetCachePath`) and some of them throw `PlatformNotSupportedException` (e.g. `CreateDomain`). See more details about particular API differences in [TODO](https://github.com/dotnet/corefx/issues/18405). +To make code migration from .NET Framework easier, we have exposed some of the `AppDomain` API surface in .NET Core. Some of the APIs work fine (e.g. `UnhandledException`), some of them do nothing (e.g. `SetCachePath`) and some of them throw `PlatformNotSupportedException` (e.g. `CreateDomain`). See more details about particular API differences in [TODO](https://github.com/dotnet/corefx/issues/18405). ### Remoting @@ -99,7 +99,7 @@ To make code migration from .NET Framework easier, we have exposed some of the ` ### Code Access Security (CAS) -**Justification**. Sandboxing, i.e. relying on the runtime or the framework to constrain which resources a managed application or library can run is [not supported on .NET Framework](https://msdn.microsoft.com/en-us/library/c5tk9z76(v=vs.110).aspx) and therefore is also not supported on .NET Core or .NET Native. We believe that there are simply too many pieces in the .NET Framework and runtime that can result in elevation of privileges. Thus we don't treat [CAS as security boundary](https://msdn.microsoft.com/en-us/library/c5tk9z76(v=vs.110).aspx) anymore. On top of that, it makes the implementation more complicated and often has correctness performance implications for applications that don’t intend to use it. +**Justification**. Sandboxing, i.e. relying on the runtime or the framework to constrain which resources a managed application or library can run is [not supported on .NET Framework](https://msdn.microsoft.com/en-us/library/c5tk9z76(v=vs.110).aspx) and therefore is also not supported on .NET Core. We believe that there are simply too many pieces in the .NET Framework and runtime that can result in elevation of privileges. Thus we don't treat [CAS as security boundary](https://msdn.microsoft.com/en-us/library/c5tk9z76(v=vs.110).aspx) anymore. On top of that, it makes the implementation more complicated and often has correctness performance implications for applications that don’t intend to use it. **Replacement**. Use operating system provided security boundaries, such as virtualization, containers, or user accounts for running processes with the least set of privileges. diff --git a/docs/libraries/project-docs/public-signing.md b/docs/libraries/project-docs/public-signing.md index 2a173d2..e1c3885 100644 --- a/docs/libraries/project-docs/public-signing.md +++ b/docs/libraries/project-docs/public-signing.md @@ -9,7 +9,7 @@ Public signing is very similar to [delay signing](http://msdn.microsoft.com/en-u When running on the full .NET Framework we only support using public signed assemblies for debugging and testing purposes. Microsoft does not guarantee that you can successfully load public signed assemblies in all scenarios that are required for production use. For list of known scenarios where public signing does not work when running on .NET Framework, see below. -However, in the context of .NET Core, or .NET Native, Microsoft supports using public signed assemblies for production uses. Make note, however, that while ability to load public signed binaries is supported on these platforms, the API and contents of the assembly itself is unsupported (due to it being privately built). +However, in the context of .NET Core, Microsoft supports using public signed assemblies for production uses. Make note, however, that while ability to load public signed binaries is supported on these platforms, the API and contents of the assembly itself is unsupported (due to it being privately built). Known issues when debugging and testing public signed assemblies on .NET Framework: diff --git a/docs/libraries/project-docs/support-dotnet-core-instructions.md b/docs/libraries/project-docs/support-dotnet-core-instructions.md index c8b33fb..6f66600 100644 --- a/docs/libraries/project-docs/support-dotnet-core-instructions.md +++ b/docs/libraries/project-docs/support-dotnet-core-instructions.md @@ -2,12 +2,6 @@ Want to make your libraries multi-platform? Want to see how much work is required to make your application compatible with other .NET platforms? The [**.NET Portability Analyzer**](http://github.com/microsoft/dotnet-apiport) is a tool that provides you with a detailed report ([example report](http://dotnet.github.io/port-to-core/Moq4_ApiPortabilityAnalysis.htm)) on how portable your code is across .NET platforms by analyzing assemblies. The Portability Analyzer is offered as a Visual Studio Extension and as a console app. -## New Targets - -- [.NET Core 5](https://www.dotnetfoundation.org/netcore): Has a modular design, employs side-by-side, and targets cross-platform scenarios. Side-by-side allows you to adopt new .NET Core versions without breaking other apps. -- [ASP.NET 5](https://www.dotnetfoundation.org/aspnet-5): is a modern web-framework built on .NET Core 5 thus giving developers the same benefits. -- [.NET Native](http://blogs.msdn.com/b/dotnet/archive/2014/04/24/dotnetnative-performance.aspx): Improve performance of your Windows Store apps that run on x64 and ARM machines by using .NET Native's static compilation. - ## How to Use Portability Analyzer To begin using the .NET Portability Analyzer, download the extension from the Visual Studio Gallery. You can configure it in Visual Studio via *Tools* >> *Options* >> *.NET Portability Analyzer* and select your Target Platforms. For now, please use ASP.NET 5 as a proxy for all .NET Core 5-based platforms (e.g. [Windows 10 .NET UAP apps](http://blogs.windows.com/buildingapps/2015/03/02/a-first-look-at-the-windows-10-universal-app-platform/)). diff --git a/src/libraries/Common/src/System/Runtime/CompilerServices/RemovableFeatureAttribute.cs b/src/libraries/Common/src/System/Runtime/CompilerServices/RemovableFeatureAttribute.cs deleted file mode 100644 index dbf871b..0000000 --- a/src/libraries/Common/src/System/Runtime/CompilerServices/RemovableFeatureAttribute.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace System.Runtime.CompilerServices -{ - // Instructs IL linkers that the method body decorated with this attribute can be removed - // during publishing. - // - // By default, the body gets replaced by throwing code. - // - // UseNopBody can be set to suppress the throwing behavior, replacing the throw with - // a no-operation body. - [AttributeUsage(AttributeTargets.Method)] - internal class RemovableFeatureAttribute : Attribute - { - public bool UseNopBody; - - public string FeatureSwitchName; - - public RemovableFeatureAttribute(string featureSwitchName) - { - FeatureSwitchName = featureSwitchName; - } - } -} diff --git a/src/libraries/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs b/src/libraries/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs index 8d979a2..2d51761 100644 --- a/src/libraries/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs +++ b/src/libraries/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs @@ -70,7 +70,6 @@ namespace System public static bool IsNetfx470OrNewer { get { throw null; } } public static bool IsNetfx471OrNewer { get { throw null; } } public static bool IsNetfx472OrNewer { get { throw null; } } - public static bool IsNetNative { get { throw null; } } public static bool IsNonZeroLowerBoundArraySupported { get { throw null; } } public static bool IsNotArm64Process { get { throw null; } } public static bool IsNotArmNorArm64Process { get { throw null; } } @@ -79,8 +78,6 @@ namespace System public static bool IsNotInAppContainer { get { throw null; } } public static bool IsNotIntMaxValueArrayIndexSupported { get { throw null; } } public static bool IsNotMacOsHighSierraOrHigher { get { throw null; } } - public static bool IsNotNetNative { get { throw null; } } - public static bool IsNotNetNativeRunningAsConsoleApp { get { throw null; } } public static bool IsNotOneCoreUAP { get { throw null; } } public static bool IsNotOSX { get { throw null; } } public static bool IsNotRedHatFamily { get { throw null; } } diff --git a/src/libraries/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj b/src/libraries/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj index fe6fbd8..e8ba108 100644 --- a/src/libraries/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj +++ b/src/libraries/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj @@ -126,7 +126,4 @@ - - - diff --git a/src/libraries/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs b/src/libraries/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs index 1787ab6..d180c60 100644 --- a/src/libraries/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs +++ b/src/libraries/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs @@ -36,8 +36,7 @@ namespace System IsFullFramework ? netFxParamName : netCoreParamName; - if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native")) - Assert.Equal(expectedParamName, exception.ParamName); + Assert.Equal(expectedParamName, exception.ParamName); } public static void Throws(string netCoreParamName, string netFxParamName, Func testCode) @@ -55,8 +54,7 @@ namespace System IsFullFramework ? netFxParamName : netCoreParamName; - if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native")) - Assert.Equal(expectedParamName, exception.ParamName); + Assert.Equal(expectedParamName, exception.ParamName); } public static T Throws(string paramName, Action action) @@ -64,8 +62,7 @@ namespace System { T exception = Assert.Throws(action); - if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native")) - Assert.Equal(paramName, exception.ParamName); + Assert.Equal(paramName, exception.ParamName); return exception; } @@ -83,8 +80,7 @@ namespace System { T exception = Assert.Throws(testCode); - if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native")) - Assert.Equal(paramName, exception.ParamName); + Assert.Equal(paramName, exception.ParamName); return exception; } @@ -94,8 +90,7 @@ namespace System { T exception = await Assert.ThrowsAsync(testCode); - if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native")) - Assert.Equal(paramName, exception.ParamName); + Assert.Equal(paramName, exception.ParamName); return exception; } @@ -111,10 +106,7 @@ namespace System if (typeof(ArgumentException).IsAssignableFrom(typeof(TNetFxExceptionType))) { Exception exception = Assert.Throws(typeof(TNetFxExceptionType), action); - if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native")) - { - Assert.Equal(paramName, ((ArgumentException)exception).ParamName); - } + Assert.Equal(paramName, ((ArgumentException)exception).ParamName); } else { diff --git a/src/libraries/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs b/src/libraries/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs index f6f2e10..2b2776c 100644 --- a/src/libraries/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs +++ b/src/libraries/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs @@ -20,9 +20,8 @@ namespace System // public static bool HasWindowsShell => IsWindows && IsNotWindowsServerCore && IsNotWindowsNanoServer && IsNotWindowsIoTCore; - public static bool IsUap => IsInAppContainer || IsNetNative; + public static bool IsUap => IsInAppContainer; public static bool IsFullFramework => RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase); - public static bool IsNetNative => RuntimeInformation.FrameworkDescription.StartsWith(".NET Native", StringComparison.OrdinalIgnoreCase); public static bool IsNetCore => RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase); public static bool IsMonoRuntime => Type.GetType("Mono.RuntimeStructs") != null; public static bool IsOSX => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); @@ -51,8 +50,6 @@ namespace System public static bool IsDomainJoinedMachine => !Environment.MachineName.Equals(Environment.UserDomainName, StringComparison.OrdinalIgnoreCase); - public static bool IsNotNetNative => !IsNetNative; - // Windows - Schannel supports alpn from win8.1/2012 R2 and higher. // Linux - OpenSsl supports alpn from openssl 1.0.2 and higher. // OSX - SecureTransport doesn't expose alpn APIs. #30492 @@ -63,12 +60,6 @@ namespace System // OpenSSL 1.1.1 and above. public static bool SupportsTls13 => !IsWindows && !IsOSX && (OpenSslVersion.CompareTo(new Version(1,1,1)) >= 0); - // Officially, .NET Native only supports processes running in an AppContainer. However, the majority of tests still work fine - // in a normal Win32 process and we often do so as running in an AppContainer imposes a substantial tax in debuggability - // and investigatability. This predicate is used in ConditionalFacts to disable the specific tests that really need to be - // running in AppContainer when running on .NetNative. - public static bool IsNotNetNativeRunningAsConsoleApp => !(IsNetNative && !IsInAppContainer); - private static Lazy m_isWindowsSubsystemForLinux = new Lazy(GetIsWindowsSubsystemForLinux); public static bool IsWindowsSubsystemForLinux => m_isWindowsSubsystemForLinux.Value; @@ -136,10 +127,9 @@ namespace System private static volatile Tuple s_lazyNonZeroLowerBoundArraySupported; - public static bool IsReflectionEmitSupported = !PlatformDetection.IsNetNative; + public static bool IsReflectionEmitSupported = true; - // Tracked in: https://github.com/dotnet/corert/issues/3643 in case we change our mind about this. - public static bool IsInvokingStaticConstructorsSupported => !PlatformDetection.IsNetNative; + public static bool IsInvokingStaticConstructorsSupported => true; // System.Security.Cryptography.Xml.XmlDsigXsltTransform.GetOutput() relies on XslCompiledTransform which relies // heavily on Reflection.Emit diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj b/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj index dc22218..eed56f7 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj +++ b/src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj @@ -162,9 +162,6 @@ - - - diff --git a/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj b/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj index 26b8348..167e8c3 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj +++ b/src/libraries/Microsoft.VisualBasic.Core/tests/Microsoft.VisualBasic.Core.Tests.csproj @@ -64,7 +64,4 @@ - - - diff --git a/src/libraries/Microsoft.Win32.Primitives/tests/Microsoft.Win32.Primitives.Tests.csproj b/src/libraries/Microsoft.Win32.Primitives/tests/Microsoft.Win32.Primitives.Tests.csproj index 108c20d..b891e01 100644 --- a/src/libraries/Microsoft.Win32.Primitives/tests/Microsoft.Win32.Primitives.Tests.csproj +++ b/src/libraries/Microsoft.Win32.Primitives/tests/Microsoft.Win32.Primitives.Tests.csproj @@ -6,7 +6,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Collections.Immutable/tests/System.Collections.Immutable.Tests.csproj b/src/libraries/System.Collections.Immutable/tests/System.Collections.Immutable.Tests.csproj index ef1b637..c682d7e 100644 --- a/src/libraries/System.Collections.Immutable/tests/System.Collections.Immutable.Tests.csproj +++ b/src/libraries/System.Collections.Immutable/tests/System.Collections.Immutable.Tests.csproj @@ -117,7 +117,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Collections.Specialized/tests/System.Collections.Specialized.Tests.csproj b/src/libraries/System.Collections.Specialized/tests/System.Collections.Specialized.Tests.csproj index f61a4c5..a17e0ec 100644 --- a/src/libraries/System.Collections.Specialized/tests/System.Collections.Specialized.Tests.csproj +++ b/src/libraries/System.Collections.Specialized/tests/System.Collections.Specialized.Tests.csproj @@ -87,7 +87,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Collections/tests/System.Collections.Tests.csproj b/src/libraries/System.Collections/tests/System.Collections.Tests.csproj index dacccf0..56cb9c2 100644 --- a/src/libraries/System.Collections/tests/System.Collections.Tests.csproj +++ b/src/libraries/System.Collections/tests/System.Collections.Tests.csproj @@ -158,7 +158,4 @@ Common\System\Collections\IDictionary.NonGeneric.Tests.netcoreapp.cs - - - \ No newline at end of file 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 30b76f5..64cd68c 100644 --- a/src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj +++ b/src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj @@ -63,7 +63,4 @@ - - - \ No newline at end of file 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 d501f9e..5f1a704 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj @@ -243,9 +243,6 @@ - - - diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj b/src/libraries/System.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj index b876d17..cfb313b 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj @@ -2,7 +2,6 @@ {B7697463-7C98-4462-BA09-67B7BF3842B6} true - false net461-Debug;net461-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release @@ -254,9 +253,6 @@ - - - diff --git a/src/libraries/System.Configuration.ConfigurationManager/tests/Mono/ConfigurationLockCollectionTest.cs b/src/libraries/System.Configuration.ConfigurationManager/tests/Mono/ConfigurationLockCollectionTest.cs index 9f7bc14..e8d2930 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/tests/Mono/ConfigurationLockCollectionTest.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/tests/Mono/ConfigurationLockCollectionTest.cs @@ -38,7 +38,7 @@ namespace MonoTests.System.Configuration { public class ConfigurationLockCollectionTest { - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void InitialState() { SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); @@ -74,7 +74,7 @@ namespace MonoTests.System.Configuration Assert.Equal(col, col.SyncRoot); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void NonExistentItem() { SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); @@ -85,7 +85,7 @@ namespace MonoTests.System.Configuration Assert.Throws(() => col.IsReadOnly("file")); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void Populate() { SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); @@ -99,7 +99,7 @@ namespace MonoTests.System.Configuration Assert.True(col.Contains("file"), "A4"); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void Populate_Error() { SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); @@ -108,7 +108,7 @@ namespace MonoTests.System.Configuration Assert.Throws(() => col.Add("boo")); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void Enumerator() { SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); @@ -122,7 +122,7 @@ namespace MonoTests.System.Configuration Assert.False(e.MoveNext(), "A3"); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void SetFromList() { SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); @@ -140,7 +140,7 @@ namespace MonoTests.System.Configuration Assert.True(col.Contains("file"), "A2"); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] [ActiveIssue("dotnet/corefx #18195", TargetFrameworkMonikers.NetFramework)] public void DuplicateAdd() { @@ -155,7 +155,7 @@ namespace MonoTests.System.Configuration Assert.Equal(1, app.LockAttributes.Count); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void IsReadOnly() { SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); diff --git a/src/libraries/System.Configuration.ConfigurationManager/tests/Mono/ConfigurationManagerTest.cs b/src/libraries/System.Configuration.ConfigurationManager/tests/Mono/ConfigurationManagerTest.cs index e278ca7..1afd91e 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/tests/Mono/ConfigurationManagerTest.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/tests/Mono/ConfigurationManagerTest.cs @@ -42,7 +42,7 @@ namespace MonoTests.System.Configuration public class ConfigurationManagerTest { - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] // OpenExeConfiguration (ConfigurationUserLevel) + [Fact] // OpenExeConfiguration (ConfigurationUserLevel) [ActiveIssue("dotnet/corefx #19384", TargetFrameworkMonikers.NetFramework)] public void OpenExeConfiguration1_UserLevel_None() { @@ -51,7 +51,7 @@ namespace MonoTests.System.Configuration Assert.Equal(TestUtil.ThisConfigFileName, fi.Name); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void OpenExeConfiguration1_UserLevel_PerUserRoaming() { string applicationData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); @@ -66,8 +66,7 @@ namespace MonoTests.System.Configuration Assert.Equal("user.config", fi.Name); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp), - nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29752 + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29752 [ActiveIssue(15065, TestPlatforms.AnyUnix)] public void OpenExeConfiguration1_UserLevel_PerUserRoamingAndLocal() { @@ -141,7 +140,7 @@ namespace MonoTests.System.Configuration Assert.Equal(TestUtil.ThisApplicationPath + ".config", config.FilePath); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void exePath_UserLevelPerRoaming() { string applicationData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); @@ -156,8 +155,7 @@ namespace MonoTests.System.Configuration Assert.Equal("user.config", Path.GetFileName(filePath)); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp), - nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29752 + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29752 [ActiveIssue(15066, TestPlatforms.AnyUnix)] public void exePath_UserLevelPerRoamingAndLocal() { @@ -260,7 +258,7 @@ namespace MonoTests.System.Configuration Assert.Equal("machineconfig", fi.Name); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] // Doesn't pass on Mono // [Category("NotWorking")] [ActiveIssue("dotnet/corefx #19384", TargetFrameworkMonikers.NetFramework)] @@ -283,13 +281,13 @@ namespace MonoTests.System.Configuration Assert.Equal("machine.config", fi.Name); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void GetSectionReturnsNativeObject() { Assert.True(ConfigurationManager.GetSection("appSettings") is NameValueCollection); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] // Test for bug #3412 + [Fact] // Test for bug #3412 // Doesn't pass on Mono // [Category("NotWorking")] public void TestAddRemoveSection() @@ -345,7 +343,7 @@ namespace MonoTests.System.Configuration } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void TestContext() { var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); diff --git a/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ApplicationSettingsBaseTests.cs b/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ApplicationSettingsBaseTests.cs index 9083c75..2c2fc85 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ApplicationSettingsBaseTests.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ApplicationSettingsBaseTests.cs @@ -46,10 +46,9 @@ namespace System.ConfigurationTests { } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp)), - InlineData(true), - InlineData(false) - ] + [Theory] + [InlineData(true)] + [InlineData(false)] [ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)] public void Context_SimpleSettings_InNotNull(bool isSynchronized) { @@ -60,10 +59,9 @@ namespace System.ConfigurationTests Assert.NotNull(settings.Context); } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp)), - InlineData(true), - InlineData(false) - ] + [Theory] + [InlineData(true)] + [InlineData(false)] [ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)] public void Providers_SimpleSettings_Empty(bool isSynchronized) { @@ -75,10 +73,9 @@ namespace System.ConfigurationTests Assert.NotNull(settings.Providers[typeof(LocalFileSettingsProvider).Name]); } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp)), - InlineData(true), - InlineData(false) - ] + [Theory] + [InlineData(true)] + [InlineData(false)] [ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)] public void GetSetStringProperty_SimpleSettings_Ok(bool isSynchronized) { @@ -91,10 +88,9 @@ namespace System.ConfigurationTests Assert.Equal("Foo", settings.StringProperty); } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp)), - InlineData(true), - InlineData(false) - ] + [Theory] + [InlineData(true)] + [InlineData(false)] [ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)] public void GetSetIntProperty_SimpleSettings_Ok(bool isSynchronized) { @@ -152,7 +148,7 @@ namespace System.ConfigurationTests Assert.Equal(DefaultIntPropertyValue, settings.IntProperty); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] [ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)] public void Reload_SimpleSettings_Ok() { @@ -191,7 +187,7 @@ namespace System.ConfigurationTests { } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] [ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)] public void SettingsProperty_SettingsWithAttributes_Ok() { diff --git a/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ImplicitMachineConfigTests.cs b/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ImplicitMachineConfigTests.cs index 5002173..61da5f1 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ImplicitMachineConfigTests.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/ImplicitMachineConfigTests.cs @@ -12,7 +12,7 @@ namespace System.ConfigurationTests { public class ImplicitMachineConfigTests { - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void RuntimeAppSettingsAccessible() { var appSettings = ConfigurationManager.AppSettings; diff --git a/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/LocalFileSettingsProviderTests.cs b/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/LocalFileSettingsProviderTests.cs index 1f51ce1..6098171 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/LocalFileSettingsProviderTests.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/tests/System/Configuration/LocalFileSettingsProviderTests.cs @@ -16,7 +16,7 @@ namespace System.ConfigurationTests }; [ActiveIssue(37364)] - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void GetPropertyValues_NotStoredProperty_ValueEqualsNull() { var property = new SettingsProperty("PropertyName"); @@ -32,7 +32,7 @@ namespace System.ConfigurationTests } [ActiveIssue(37364)] - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] + [Fact] public void GetPropertyValues_NotStoredConnectionStringProperty_ValueEqualsEmptyString() { var property = new SettingsProperty("PropertyName"); diff --git a/src/libraries/System.Data.Common/src/MatchingRefApiCompatBaseline.uapaot.txt b/src/libraries/System.Data.Common/src/MatchingRefApiCompatBaseline.uapaot.txt deleted file mode 100644 index 36ea9ae..0000000 --- a/src/libraries/System.Data.Common/src/MatchingRefApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,2 +0,0 @@ -#Exposed publicly in only in uapaot implementation to enable reflection on this type -TypesMustExist : Type 'System.Data.DataCommonEventSource' does not exist in the reference but it does exist in the implementation. 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 3d99b44..5889067 100644 --- a/src/libraries/System.Data.Common/src/System.Data.Common.csproj +++ b/src/libraries/System.Data.Common/src/System.Data.Common.csproj @@ -330,15 +330,7 @@ - - - - - - - - diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DataCommonEventSource.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DataCommonEventSource.cs index 4a1c148..5e81755 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DataCommonEventSource.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DataCommonEventSource.cs @@ -8,127 +8,67 @@ using System.Threading; namespace System.Data { [EventSource(Name = "System.Data.DataCommonEventSource")] -#if uapaot - public -#else - internal -#endif - class DataCommonEventSource : EventSource + internal class DataCommonEventSource : EventSource { internal static readonly DataCommonEventSource Log = new DataCommonEventSource(); private static long s_nextScopeId = 0; -#if uapaot - public -#else - private -#endif - const int TraceEventId = 1; - -#if uapaot - public -#else - private -#endif - const int EnterScopeId = 2; - -#if uapaot - public -#else - private -#endif - const int ExitScopeId = 3; + private const int TraceEventId = 1; + + private const int EnterScopeId = 2; + + private const int ExitScopeId = 3; [Event(TraceEventId, Level = EventLevel.Informational)] -#if uapaot - public -#else - internal -#endif - void Trace(string message) + internal void Trace(string message) { WriteEvent(TraceEventId, message); } [NonEvent] -#if uapaot - public -#else - internal -#endif - void Trace(string format, T0 arg0) + internal void Trace(string format, T0 arg0) { if (!Log.IsEnabled()) return; Trace(string.Format(format, arg0)); } [NonEvent] -#if uapaot - public -#else - internal -#endif - void Trace(string format, T0 arg0, T1 arg1) + internal void Trace(string format, T0 arg0, T1 arg1) { if (!Log.IsEnabled()) return; Trace(string.Format(format, arg0, arg1)); } [NonEvent] -#if uapaot - public -#else - internal -#endif - void Trace(string format, T0 arg0, T1 arg1, T2 arg2) + internal void Trace(string format, T0 arg0, T1 arg1, T2 arg2) { if (!Log.IsEnabled()) return; Trace(string.Format(format, arg0, arg1, arg2)); } [NonEvent] -#if uapaot - public -#else - internal -#endif - void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3) + internal void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3) { if (!Log.IsEnabled()) return; Trace(string.Format(format, arg0, arg1, arg2, arg3)); } [NonEvent] -#if uapaot - public -#else - internal -#endif - void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) + internal void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) { if (!Log.IsEnabled()) return; Trace(string.Format(format, arg0, arg1, arg2, arg3, arg4)); } [NonEvent] -#if uapaot - public -#else - internal -#endif - void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) + internal void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) { if (!Log.IsEnabled()) return; Trace(string.Format(format, arg0, arg1, arg2, arg3, arg4, arg5, arg6)); } [Event(EnterScopeId, Level = EventLevel.Verbose)] -#if uapaot - public -#else - internal -#endif - long EnterScope(string message) + internal long EnterScope(string message) { long scopeId = 0; if (Log.IsEnabled()) @@ -140,44 +80,19 @@ namespace System.Data } [NonEvent] -#if uapaot - public -#else - internal -#endif - long EnterScope(string format, T1 arg1) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1)) : 0; + internal long EnterScope(string format, T1 arg1) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1)) : 0; [NonEvent] -#if uapaot - public -#else - internal -#endif - long EnterScope(string format, T1 arg1, T2 arg2) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2)) : 0; + internal long EnterScope(string format, T1 arg1, T2 arg2) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2)) : 0; [NonEvent] -#if uapaot - public -#else - internal -#endif - long EnterScope(string format, T1 arg1, T2 arg2, T3 arg3) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3)) : 0; + internal long EnterScope(string format, T1 arg1, T2 arg2, T3 arg3) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3)) : 0; [NonEvent] -#if uapaot - public -#else - internal -#endif - long EnterScope(string format, T1 arg1, T2 arg2, T3 arg3, T4 arg4) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3, arg4)) : 0; + internal long EnterScope(string format, T1 arg1, T2 arg2, T3 arg3, T4 arg4) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3, arg4)) : 0; [Event(ExitScopeId, Level = EventLevel.Verbose)] -#if uapaot - public -#else - internal -#endif - void ExitScope(long scopeId) + internal void ExitScope(long scopeId) { WriteEvent(ExitScopeId, scopeId); } diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SqlXml.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SqlXml.cs index 7c9940a..0108f3f 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SqlXml.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SqlXml.cs @@ -19,10 +19,8 @@ namespace System.Data.SqlTypes private static readonly Func s_sqlReaderDelegate = CreateSqlReaderDelegate(); private static readonly XmlReaderSettings s_defaultXmlReaderSettings = new XmlReaderSettings() { ConformanceLevel = ConformanceLevel.Fragment }; private static readonly XmlReaderSettings s_defaultXmlReaderSettingsCloseInput = new XmlReaderSettings() { ConformanceLevel = ConformanceLevel.Fragment, CloseInput = true }; -#if !uapaot private static MethodInfo s_createSqlReaderMethodInfo; private MethodInfo _createSqlReaderMethodInfo; -#endif private bool _fNotNull; // false if null, the default ctor (plain 0) will make it Null private Stream _stream; @@ -86,14 +84,12 @@ namespace System.Data.SqlTypes stream.Seek(0, SeekOrigin.Begin); } -#if !uapaot // NOTE: Maintaining createSqlReaderMethodInfo private field member to preserve the serialization of the class if (_createSqlReaderMethodInfo == null) { _createSqlReaderMethodInfo = CreateSqlReaderMethodInfo; } Debug.Assert(_createSqlReaderMethodInfo != null, "MethodInfo reference for XmlReader.CreateSqlReader should not be null."); -#endif XmlReader r = CreateSqlXmlReader(stream); _firstCreateReader = false; @@ -122,9 +118,6 @@ namespace System.Data.SqlTypes } } -#if uapaot - private static Func CreateSqlReaderDelegate() => System.Xml.XmlReader.CreateSqlReader; -#else private static Func CreateSqlReaderDelegate() { Debug.Assert(CreateSqlReaderMethodInfo != null, "MethodInfo reference for XmlReader.CreateSqlReader should not be null."); @@ -144,7 +137,6 @@ namespace System.Data.SqlTypes return s_createSqlReaderMethodInfo; } } -#endif // INullable public bool IsNull diff --git a/src/libraries/System.Data.Common/tests/System.Data.Common.Tests.csproj b/src/libraries/System.Data.Common/tests/System.Data.Common.Tests.csproj index 86bf672..744c418 100644 --- a/src/libraries/System.Data.Common/tests/System.Data.Common.Tests.csproj +++ b/src/libraries/System.Data.Common/tests/System.Data.Common.Tests.csproj @@ -120,7 +120,4 @@ - - - diff --git a/src/libraries/System.Data.OleDb/src/System/Data/Common/DataCommonEventSource.cs b/src/libraries/System.Data.OleDb/src/System/Data/Common/DataCommonEventSource.cs index 1df531f..8ef6832 100644 --- a/src/libraries/System.Data.OleDb/src/System/Data/Common/DataCommonEventSource.cs +++ b/src/libraries/System.Data.OleDb/src/System/Data/Common/DataCommonEventSource.cs @@ -8,119 +8,23 @@ using System.Threading; namespace System.Data { [EventSource(Name = "System.Data.DataCommonEventSource")] -#if uapaot - public -#else - internal -#endif - class DataCommonEventSource : EventSource + internal class DataCommonEventSource : EventSource { internal static readonly DataCommonEventSource Log = new DataCommonEventSource(); -#if uapaot - public -#else - private -#endif - const int TraceEventId = 1; + private const int TraceEventId = 1; [Event(TraceEventId, Level = EventLevel.Informational)] -#if uapaot - public -#else - internal -#endif - void Trace(string message) + internal void Trace(string message) { WriteEvent(TraceEventId, message); } [NonEvent] -#if uapaot - public -#else - internal -#endif - void Trace(string format, T0 arg0) + internal void Trace(string format, T0 arg0) { if (!Log.IsEnabled()) return; Trace(string.Format(format, arg0)); } - -#if uapaot - private static long s_nextScopeId = 0; - public const int EnterScopeId = 2; - public const int ExitScopeId = 3; - - [NonEvent] - public void Trace(string format, T0 arg0, T1 arg1) - { - if (!Log.IsEnabled()) - return; - Trace(string.Format(format, arg0, arg1)); - } - - [NonEvent] - public void Trace(string format, T0 arg0, T1 arg1, T2 arg2) - { - if (!Log.IsEnabled()) - return; - Trace(string.Format(format, arg0, arg1, arg2)); - } - - [NonEvent] - public void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3) - { - if (!Log.IsEnabled()) - return; - Trace(string.Format(format, arg0, arg1, arg2, arg3)); - } - - [NonEvent] - public void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) - { - if (!Log.IsEnabled()) - return; - Trace(string.Format(format, arg0, arg1, arg2, arg3, arg4)); - } - - [NonEvent] - public void Trace(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) - { - if (!Log.IsEnabled()) - return; - Trace(string.Format(format, arg0, arg1, arg2, arg3, arg4, arg5, arg6)); - } - - [Event(EnterScopeId, Level = EventLevel.Verbose)] - public long EnterScope(string message) - { - long scopeId = 0; - if (Log.IsEnabled()) - { - scopeId = Interlocked.Increment(ref s_nextScopeId); - WriteEvent(EnterScopeId, scopeId, message); - } - return scopeId; - } - - [NonEvent] - public long EnterScope(string format, T1 arg1) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1)) : 0; - - [NonEvent] - public long EnterScope(string format, T1 arg1, T2 arg2) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2)) : 0; - - [NonEvent] - public long EnterScope(string format, T1 arg1, T2 arg2, T3 arg3) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3)) : 0; - - [NonEvent] - public long EnterScope(string format, T1 arg1, T2 arg2, T3 arg3, T4 arg4) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3, arg4)) : 0; - - [Event(ExitScopeId, Level = EventLevel.Verbose)] - public void ExitScope(long scopeId) - { - WriteEvent(ExitScopeId, scopeId); - } -#endif } } diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj index b40efde..de66602 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj @@ -7,7 +7,6 @@ to work with older NuGet clients --> netstandard1.1;portable-net45+win8+wpa81 true - false false net45-Debug;net45-Release;net46-Debug;net46-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release;netstandard1.3-Debug;netstandard1.3-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release 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 029a6f1..5243b7b 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 @@ -41,7 +41,7 @@ - + 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 860cd82..85f84e6 100644 --- a/src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj +++ b/src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj @@ -9,8 +9,9 @@ $(NoWarn);1685 netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - + + @@ -25,8 +26,7 @@ - - + @@ -36,9 +36,6 @@ - - - diff --git a/src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/StackTraceSymbols.CoreCLR.cs b/src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/StackTraceSymbols.cs similarity index 100% rename from src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/StackTraceSymbols.CoreCLR.cs rename to src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/StackTraceSymbols.cs 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 18d471a..18e836e 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 @@ -45,7 +45,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj b/src/libraries/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj index 22455cb..b15be1a 100644 --- a/src/libraries/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj +++ b/src/libraries/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj @@ -153,7 +153,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Globalization.Calendars/tests/System.Globalization.Calendars.Tests.csproj b/src/libraries/System.Globalization.Calendars/tests/System.Globalization.Calendars.Tests.csproj index a6d4f43..a3c0f66 100644 --- a/src/libraries/System.Globalization.Calendars/tests/System.Globalization.Calendars.Tests.csproj +++ b/src/libraries/System.Globalization.Calendars/tests/System.Globalization.Calendars.Tests.csproj @@ -108,7 +108,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Globalization.Extensions/tests/System.Globalization.Extensions.Tests.csproj b/src/libraries/System.Globalization.Extensions/tests/System.Globalization.Extensions.Tests.csproj index 9b5fb18..9843017 100644 --- a/src/libraries/System.Globalization.Extensions/tests/System.Globalization.Extensions.Tests.csproj +++ b/src/libraries/System.Globalization.Extensions/tests/System.Globalization.Extensions.Tests.csproj @@ -32,6 +32,5 @@ NormalizationDataWin7 - \ No newline at end of file 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 c69ee5f..85b8ad8 100644 --- a/src/libraries/System.IO.FileSystem/src/System.IO.FileSystem.csproj +++ b/src/libraries/System.IO.FileSystem/src/System.IO.FileSystem.csproj @@ -5,7 +5,7 @@ true $(NoWarn);CS1573 true - true + true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release 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 5205170..5339d91 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 @@ -180,7 +180,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.IO/tests/System.IO.Tests.csproj b/src/libraries/System.IO/tests/System.IO.Tests.csproj index ffd74d6..0fcb607 100644 --- a/src/libraries/System.IO/tests/System.IO.Tests.csproj +++ b/src/libraries/System.IO/tests/System.IO.Tests.csproj @@ -76,7 +76,4 @@ - - - \ No newline at end of file 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 3208bdb..5f45acf 100644 --- a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj +++ b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj @@ -8,18 +8,11 @@ {AEF718E9-D4FC-418F-A7AE-ED6B2C7B3787} System.Linq.Expressions System.Linq.Expressions - true - - $(DefineConstants);FEATURE_DLG_INVOKE;FEATURE_FAST_CREATE + false + $(DefineConstants);FEATURE_DLG_INVOKE;FEATURE_FAST_CREATE $(DefineConstants);FEATURE_COMPILE $(DefineConstants);FEATURE_INTERPRET - - $(DefineConstants);FEATURE_DYNAMIC_DELEGATE - - - - diff --git a/src/libraries/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj b/src/libraries/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj index 0167bac..0868111 100644 --- a/src/libraries/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj +++ b/src/libraries/System.Linq.Queryable/tests/System.Linq.Queryable.Tests.csproj @@ -61,7 +61,4 @@ Common\System\Linq\SkipTakeData.cs - - - \ No newline at end of file diff --git a/src/libraries/System.Linq/tests/System.Linq.Tests.csproj b/src/libraries/System.Linq/tests/System.Linq.Tests.csproj index f611031..f00efd0 100644 --- a/src/libraries/System.Linq/tests/System.Linq.Tests.csproj +++ b/src/libraries/System.Linq/tests/System.Linq.Tests.csproj @@ -78,7 +78,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Memory/src/ApiCompatBaseline.uapaot.txt b/src/libraries/System.Memory/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index c921ccc..0000000 --- a/src/libraries/System.Memory/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,37 +0,0 @@ -Compat issues with assembly System.Memory: -CannotRemoveBaseTypeOrInterface : Type 'System.Memory' does not implement interface 'System.IEquatable>' in the implementation but it does in the contract. -CannotRemoveBaseTypeOrInterface : Type 'System.ReadOnlyMemory' does not implement interface 'System.IEquatable>' in the implementation but it does in the contract. -MembersMustExist : Member 'System.MemoryExtensions.Trim(System.Memory)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.Trim(System.ReadOnlyMemory)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.Trim(System.Span)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.Trim(System.Memory, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.Trim(System.Memory, T)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.Trim(System.ReadOnlyMemory, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.Trim(System.ReadOnlyMemory, T)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.Trim(System.ReadOnlySpan, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.Trim(System.ReadOnlySpan, T)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.Trim(System.Span, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.Trim(System.Span, T)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.Memory)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.ReadOnlyMemory)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.Span)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.Memory, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.Memory, T)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.ReadOnlyMemory, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.ReadOnlyMemory, T)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.ReadOnlySpan, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.ReadOnlySpan, T)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.Span, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.Span, T)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.Memory)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.ReadOnlyMemory)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.Span)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.Memory, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.Memory, T)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.ReadOnlyMemory, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.ReadOnlyMemory, T)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.ReadOnlySpan, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.ReadOnlySpan, T)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.Span, System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.Span, T)' does not exist in the implementation but it does exist in the contract. -Total issues: 35 diff --git a/src/libraries/System.Memory/tests/System.Memory.Tests.csproj b/src/libraries/System.Memory/tests/System.Memory.Tests.csproj index a42220e..e3f1ae7 100644 --- a/src/libraries/System.Memory/tests/System.Memory.Tests.csproj +++ b/src/libraries/System.Memory/tests/System.Memory.Tests.csproj @@ -267,7 +267,4 @@ Common\System\MutableDecimal.cs - - - \ No newline at end of file diff --git a/src/libraries/System.Net.HttpListener/tests/System.Net.HttpListener.Tests.csproj b/src/libraries/System.Net.HttpListener/tests/System.Net.HttpListener.Tests.csproj index c13926e..e2a0773 100644 --- a/src/libraries/System.Net.HttpListener/tests/System.Net.HttpListener.Tests.csproj +++ b/src/libraries/System.Net.HttpListener/tests/System.Net.HttpListener.Tests.csproj @@ -28,9 +28,6 @@ Common\System\Threading\Tasks\TaskTimeoutExtensions.cs - - - 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 9f4d94a..9e44398 100644 --- a/src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj +++ b/src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj @@ -180,9 +180,6 @@ Interop\Unix\System.Native\Interop.SocketAddress.cs - - - diff --git a/src/libraries/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj b/src/libraries/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj index 9686224..9154cad 100644 --- a/src/libraries/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj +++ b/src/libraries/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj @@ -35,7 +35,4 @@ - - - \ No newline at end of file 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 240a0df..681c462 100644 --- a/src/libraries/System.Net.Sockets/src/System.Net.Sockets.csproj +++ b/src/libraries/System.Net.Sockets/src/System.Net.Sockets.csproj @@ -115,7 +115,7 @@ - + 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 6eab7a3..69b3f9a 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 @@ -114,7 +114,4 @@ Common\System\Net\Logging\NetEventSource.Common.cs - - - 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 86a6af1..79c74dd 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj +++ b/src/libraries/System.Private.DataContractSerialization/src/System.Private.DataContractSerialization.csproj @@ -9,9 +9,6 @@ true AnyCPU $(DefineConstants);FEATURE_SERIALIZATION - $(DefineConstants);uapaot - - false netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -27,9 +24,6 @@ Common\System\NotImplemented.cs - - System\Runtime\CompilerServices\RemovableFeatureAttribute - @@ -48,7 +42,6 @@ - @@ -72,7 +65,7 @@ - + @@ -137,7 +130,7 @@ - + @@ -161,9 +154,6 @@ - - - diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs index 27f9522..810f054 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs @@ -19,7 +19,7 @@ namespace System.Runtime.Serialization using DataContractDictionary = System.Collections.Generic.Dictionary; using System.Linq; -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public sealed class ClassDataContract : DataContract #else internal sealed class ClassDataContract : DataContract @@ -37,13 +37,6 @@ namespace System.Runtime.Serialization private bool _isScriptObject; -#if uapaot - public ClassDataContract() : base(new ClassDataContractCriticalHelper()) - { - InitClassDataContract(); - } -#endif - internal ClassDataContract(Type type) : base(new ClassDataContractCriticalHelper(type)) { InitClassDataContract(); @@ -130,13 +123,11 @@ namespace System.Runtime.Serialization get { return _helper.ExtensionDataSetMethod; } } -#if !uapaot public override DataContractDictionary KnownDataContracts { get { return _helper.KnownDataContracts; } } -#endif public override bool IsISerializable { @@ -150,14 +141,6 @@ namespace System.Runtime.Serialization { return _helper.IsNonAttributedType; } } -#if uapaot - public bool HasDataContract - { - get - { return _helper.HasDataContract; } - set { _helper.HasDataContract = value; } - } -#endif public bool HasExtensionData { get @@ -243,30 +226,15 @@ namespace System.Runtime.Serialization return true; } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private XmlFormatClassWriterDelegate CreateXmlFormatWriterDelegate() { return new XmlFormatWriterGenerator().GenerateClassWriter(this); } -#if uapaot - private XmlFormatClassWriterDelegate _xmlFormatWriterDelegate; - public XmlFormatClassWriterDelegate XmlFormatWriterDelegate -#else internal XmlFormatClassWriterDelegate XmlFormatWriterDelegate -#endif { get { -#if uapaot - if (DataContractSerializer.Option == SerializationOption.CodeGenOnly - || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _xmlFormatWriterDelegate != null)) - { - return _xmlFormatWriterDelegate; - } -#endif if (_helper.XmlFormatWriterDelegate == null) { lock (this) @@ -283,36 +251,18 @@ namespace System.Runtime.Serialization } set { -#if uapaot - _xmlFormatWriterDelegate = value; -#endif } } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private XmlFormatClassReaderDelegate CreateXmlFormatReaderDelegate() { return new XmlFormatReaderGenerator().GenerateClassReader(this); } -#if uapaot - private XmlFormatClassReaderDelegate _xmlFormatReaderDelegate; - public XmlFormatClassReaderDelegate XmlFormatReaderDelegate -#else internal XmlFormatClassReaderDelegate XmlFormatReaderDelegate -#endif { get { -#if uapaot - if (DataContractSerializer.Option == SerializationOption.CodeGenOnly - || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _xmlFormatReaderDelegate != null)) - { - return _xmlFormatReaderDelegate; - } -#endif if (_helper.XmlFormatReaderDelegate == null) { lock (this) @@ -329,9 +279,6 @@ namespace System.Runtime.Serialization } set { -#if uapaot - _xmlFormatReaderDelegate = value; -#endif } } @@ -802,17 +749,17 @@ namespace System.Runtime.Serialization // // We wanted to enable the fix for the issue described above only when SG generated DataContracts are available. // Currently we don't have a good way of detecting usage of SG (either globally or per data contract). - // But since SG is currently only used by .NET Native, so we used the "#if uapaot" to target the fix for .Net - // Native only. -#if uapaot - DataContract baseContract = DataContract.GetDataContractCreatedAtRuntime(baseType); -#else + DataContract baseContract = DataContract.GetDataContract(baseType); -#endif if (baseContract is CollectionDataContract) + { this.BaseContract = ((CollectionDataContract)baseContract).SharedTypeContract as ClassDataContract; + } else + { this.BaseContract = baseContract as ClassDataContract; + } + if (this.BaseContract != null && this.BaseContract.IsNonAttributedType && !_isNonAttributedType) { throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError @@ -1394,9 +1341,6 @@ namespace System.Runtime.Serialization internal bool HasDataContract { get { return _hasDataContract; } -#if uapaot - set { _hasDataContract = value; } -#endif } internal bool HasExtensionData @@ -1584,7 +1528,6 @@ namespace System.Runtime.Serialization internal static DataMemberComparer Singleton = new DataMemberComparer(); } -#if !uapaot /// /// Get object type for Xml/JsonFormmatReaderGenerator /// @@ -1600,8 +1543,6 @@ namespace System.Runtime.Serialization return type; } } -#endif - internal ClassDataContract Clone() { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CodeGenerator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CodeGenerator.cs index 55140aa..14cc06b 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CodeGenerator.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CodeGenerator.cs @@ -13,7 +13,6 @@ using System.IO; using System.Security; using System.Diagnostics; -#if !uapaot namespace System.Runtime.Serialization { internal class CodeGenerator @@ -60,7 +59,6 @@ namespace System.Runtime.Serialization } } -#if !uapaot private static MethodInfo s_objectToString; private static MethodInfo ObjectToString { @@ -88,7 +86,6 @@ namespace System.Runtime.Serialization return s_stringFormat; } } -#endif private Type _delegateType; @@ -123,10 +120,7 @@ namespace System.Runtime.Serialization private enum CodeGenTrace { None, Save, Tron }; private CodeGenTrace _codeGenTrace; - -#if !uapaot private LocalBuilder _stringFormatArray; -#endif internal CodeGenerator() { @@ -1620,7 +1614,6 @@ namespace System.Runtime.Serialization If(Cmp.NotEqualTo); } -#if !uapaot internal void BeginWhileCondition() { Label startWhile = DefineLabel(); @@ -1667,10 +1660,8 @@ namespace System.Runtime.Serialization Call(ObjectToString); } } -#endif } - internal class ArgBuilder { internal int Index; @@ -1835,5 +1826,4 @@ namespace System.Runtime.Serialization } } } -} -#endif +} \ No newline at end of file diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs index e57c73c..f859a68 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs @@ -118,11 +118,7 @@ namespace System.Runtime.Serialization } } -#if uapaot - public enum CollectionKind : byte -#else internal enum CollectionKind : byte -#endif { None, GenericDictionary, @@ -136,7 +132,7 @@ namespace System.Runtime.Serialization Array, } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public sealed class CollectionDataContract : DataContract #else internal sealed class CollectionDataContract : DataContract @@ -337,30 +333,15 @@ namespace System.Runtime.Serialization { return _helper.InvalidCollectionInSharedContractMessage; } } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private XmlFormatCollectionWriterDelegate CreateXmlFormatWriterDelegate() { return new XmlFormatWriterGenerator().GenerateCollectionWriter(this); } -#if uapaot - private XmlFormatCollectionWriterDelegate _xmlFormatWriterDelegate; - public XmlFormatCollectionWriterDelegate XmlFormatWriterDelegate -#else internal XmlFormatCollectionWriterDelegate XmlFormatWriterDelegate -#endif { get { -#if uapaot - if (DataContractSerializer.Option == SerializationOption.CodeGenOnly - || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _xmlFormatWriterDelegate != null)) - { - return _xmlFormatWriterDelegate; - } -#endif if (_helper.XmlFormatWriterDelegate == null) { lock (this) @@ -377,36 +358,18 @@ namespace System.Runtime.Serialization } set { -#if uapaot - _xmlFormatWriterDelegate = value; -#endif } } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private XmlFormatCollectionReaderDelegate CreateXmlFormatReaderDelegate() { return new XmlFormatReaderGenerator().GenerateCollectionReader(this); } -#if uapaot - private XmlFormatCollectionReaderDelegate _xmlFormatReaderDelegate; - public XmlFormatCollectionReaderDelegate XmlFormatReaderDelegate -#else internal XmlFormatCollectionReaderDelegate XmlFormatReaderDelegate -#endif { get { -#if uapaot - if (DataContractSerializer.Option == SerializationOption.CodeGenOnly - || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _xmlFormatReaderDelegate != null)) - { - return _xmlFormatReaderDelegate; - } -#endif if (_helper.XmlFormatReaderDelegate == null) { lock (this) @@ -423,37 +386,19 @@ namespace System.Runtime.Serialization } set { -#if uapaot - _xmlFormatReaderDelegate = value; -#endif } } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private XmlFormatGetOnlyCollectionReaderDelegate CreateXmlFormatGetOnlyCollectionReaderDelegate() { return new XmlFormatReaderGenerator().GenerateGetOnlyCollectionReader(this); } -#if uapaot - private XmlFormatGetOnlyCollectionReaderDelegate _xmlFormatGetOnlyCollectionReaderDelegate; - public XmlFormatGetOnlyCollectionReaderDelegate XmlFormatGetOnlyCollectionReaderDelegate -#else internal XmlFormatGetOnlyCollectionReaderDelegate XmlFormatGetOnlyCollectionReaderDelegate -#endif { get { -#if uapaot - if (DataContractSerializer.Option == SerializationOption.CodeGenOnly - || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _xmlFormatGetOnlyCollectionReaderDelegate != null)) - { - return _xmlFormatGetOnlyCollectionReaderDelegate; - } -#endif if (_helper.XmlFormatGetOnlyCollectionReaderDelegate == null) { lock (this) @@ -480,9 +425,6 @@ namespace System.Runtime.Serialization } set { -#if uapaot - _xmlFormatGetOnlyCollectionReaderDelegate = value; -#endif } } @@ -1521,12 +1463,6 @@ namespace System.Runtime.Serialization { // IsGetOnlyCollection value has already been used to create current collectiondatacontract, value can now be reset. context.IsGetOnlyCollection = false; -#if uapaot - if (XmlFormatGetOnlyCollectionReaderDelegate == null) - { - throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, UnderlyingType)); - } -#endif XmlFormatGetOnlyCollectionReaderDelegate(xmlReader, context, CollectionItemName, Namespace, this); } else diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs index b1c2806..25d187f 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs @@ -17,7 +17,7 @@ namespace System.Runtime.Serialization using Xml.Schema; using System.Collections.Concurrent; -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public abstract class DataContract #else internal abstract class DataContract @@ -60,54 +60,8 @@ namespace System.Runtime.Serialization internal static DataContract GetDataContractFromGeneratedAssembly(Type type) { -#if uapaot - if (DataContractSerializer.Option == SerializationOption.ReflectionOnly) - { - return null; - } - - type = GetDataContractAdapterTypeForGeneratedAssembly(type); - DataContract dataContract = GetGeneratedDataContract(type); - if (dataContract == null) - { - if (type.IsInterface && !CollectionDataContract.IsCollectionInterface(type)) - { - type = Globals.TypeOfObject; - dataContract = GetGeneratedDataContract(type); - } - if (dataContract == null) - { - if (DataContractSerializer.Option == SerializationOption.CodeGenOnly) - { - throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, type)); - } - } - } - - if (dataContract is InvalidDataContract && DataContractSerializer.Option == SerializationOption.ReflectionAsBackup) - { - return null; - } - - return dataContract; -#else return null; -#endif - } - -#if uapaot - // This method returns adapter types used to get DataContract from - // generated assembly. - private static Type GetDataContractAdapterTypeForGeneratedAssembly(Type type) - { - if (type == Globals.TypeOfDateTimeOffset) - { - return Globals.TypeOfDateTimeOffsetAdapter; - } - - return type; } -#endif internal MethodInfo ParseMethod { @@ -141,13 +95,6 @@ namespace System.Runtime.Serialization { return DataContractCriticalHelper.GetDataContractSkipValidation(id, typeHandle, type); } -#if uapaot - internal static DataContract GetDataContractCreatedAtRuntime(Type type, SerializationMode mode = SerializationMode.SharedContract) - { - DataContract dataContract = DataContractCriticalHelper.GetDataContractCreatedAtRuntime(type); - return dataContract.GetValidContract(mode); - } -#endif internal static DataContract GetGetOnlyCollectionDataContract(int id, RuntimeTypeHandle typeHandle, Type type, SerializationMode mode) { @@ -210,7 +157,7 @@ namespace System.Runtime.Serialization DataContractCriticalHelper.ThrowInvalidDataContractException(message, type); } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT internal DataContractCriticalHelper Helper #else protected DataContractCriticalHelper Helper @@ -246,17 +193,6 @@ namespace System.Runtime.Serialization { return _helper.TypeForInitialization; } } -#if uapaot - /// - /// Invoked once immediately before attempting to read, permitting additional setup or verification - /// - /// The reader from which the next read will occur. - public virtual void PrepareToRead(XmlReaderDelegator xmlReader) - { - // Base class does no work. Intended for derived types to execute before serializer attempts to read. - } -#endif - public virtual void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context) { throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(this.GetType()), DataContract.GetClrTypeFullName(UnderlyingType)))); @@ -371,12 +307,6 @@ namespace System.Runtime.Serialization get { return false; } } -#if uapaot - public bool TypeIsInterface; - public bool TypeIsCollectionInterface; - public Type GenericTypeDefinition; -#endif - internal virtual void WriteRootElement(XmlWriterDelegator writer, XmlDictionaryString name, XmlDictionaryString ns) { if (object.ReferenceEquals(ns, DictionaryGlobals.SerializationNamespace) && !IsPrimitive) @@ -404,9 +334,6 @@ namespace System.Runtime.Serialization { private static Dictionary s_typeToIDCache = new Dictionary(new TypeHandleRefEqualityComparer()); private static DataContract[] s_dataContractCache = new DataContract[32]; -#if uapaot - private static ConcurrentDictionary s_dataContractCacheCreatedAtRuntime = new ConcurrentDictionary(); -#endif private static int s_dataContractID; private static Dictionary s_typeToBuiltInContract; private static Dictionary s_nameToBuiltInContract; @@ -439,12 +366,6 @@ namespace System.Runtime.Serialization internal static DataContract GetDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type type) { -#if uapaot - // The generated serialization assembly uses different ids than the running code. - // We should have 'dataContractCache' from 'Type' to 'DataContract', since ids are not used at runtime. - id = GetId(typeHandle); -#endif - DataContract dataContract = s_dataContractCache[id]; if (dataContract == null) { @@ -458,31 +379,8 @@ namespace System.Runtime.Serialization return dataContract; } -#if uapaot - internal static DataContract GetDataContractCreatedAtRuntime(Type type) - { - if (type == null) - { - throw new ArgumentNullException(nameof(type)); - } - - DataContract dataContract = s_dataContractCacheCreatedAtRuntime.GetOrAdd(type, (t) => - { - return CreateDataContract(t); - }); - - return dataContract.GetValidContract(); - } -#endif - internal static DataContract GetGetOnlyCollectionDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type type) { -#if uapaot - // The generated serialization assembly uses different ids than the running code. - // We should have 'dataContractCache' from 'Type' to 'DataContract', since ids are not used at runtime. - id = GetId(typeHandle); -#endif - DataContract dataContract = s_dataContractCache[id]; if (dataContract == null) { @@ -1191,12 +1089,8 @@ namespace System.Runtime.Serialization internal virtual DataContractDictionary KnownDataContracts { -#if uapaot - get; set; -#else get { return null; } set { /* do nothing */ } -#endif } internal virtual bool IsISerializable @@ -2302,12 +2196,10 @@ namespace System.Runtime.Serialization return false; } -#if !uapaot internal static string SanitizeTypeName(string typeName) { return typeName.Replace('.', '_'); } -#endif } internal interface IGenericNameProvider diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSerializer.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSerializer.cs index 010d1ea..e053f3d 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSerializer.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContractSerializer.cs @@ -50,14 +50,8 @@ namespace System.Runtime.Serialization } } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name, UseNopBody = true)] -#endif private static bool IsReflectionBackupAllowed() { - // The RemovableFeature annotation above is going to replace this with - // "return false" if reflection based serialization feature was removed - // at publishing time. return true; } @@ -94,11 +88,7 @@ namespace System.Runtime.Serialization Initialize(type, rootName, rootNamespace, knownTypes, int.MaxValue, false, false, null, false); } -#if uapaot - public DataContractSerializer(Type type, IEnumerable knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, bool preserveObjectReferences) -#else internal DataContractSerializer(Type type, IEnumerable knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, bool preserveObjectReferences) -#endif { Initialize(type, knownTypes, maxItemsInObjectGraph, ignoreExtensionDataObject, preserveObjectReferences, null, false); } @@ -426,10 +416,6 @@ namespace System.Runtime.Serialization if (dataContractResolver == null) dataContractResolver = this.DataContractResolver; -#if uapaot - // Give the root contract a chance to initialize or pre-verify the read - RootContract.PrepareToRead(xmlReader); -#endif if (verifyObjectName) { if (!InternalIsStartObject(xmlReader)) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataMember.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataMember.cs index 7c80da1..b358aba 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataMember.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataMember.cs @@ -13,11 +13,7 @@ using System.Security; namespace System.Runtime.Serialization { -#if uapaot - public class DataMember -#else internal class DataMember -#endif { private CriticalHelper _helper; diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs index eb72c3e..67af292 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs @@ -16,11 +16,7 @@ using System.Linq; namespace System.Runtime.Serialization { -#if uapaot - public sealed class EnumDataContract : DataContract -#else internal sealed class EnumDataContract : DataContract -#endif { private EnumDataContractCriticalHelper _helper; diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataObject.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataObject.cs index 62d8d59..4e09a34 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataObject.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataObject.cs @@ -13,7 +13,7 @@ namespace System.Runtime.Serialization { private IList _members; -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public ExtensionDataObject() #else internal ExtensionDataObject() @@ -21,7 +21,7 @@ namespace System.Runtime.Serialization { } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public IList Members #else internal IList Members @@ -32,7 +32,7 @@ namespace System.Runtime.Serialization } } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public class ExtensionDataMember #else internal class ExtensionDataMember @@ -67,7 +67,7 @@ namespace System.Runtime.Serialization } } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public interface IDataNode #else internal interface IDataNode diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataReader.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataReader.cs index 011b2bc..e4db899 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataReader.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataReader.cs @@ -505,7 +505,7 @@ namespace System.Runtime.Serialization } } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public class AttributeData #else internal class AttributeData @@ -517,7 +517,7 @@ namespace System.Runtime.Serialization public string value; } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public class ElementData #else internal class ElementData diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs index 37f31ff..56ab9df 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Globals.cs @@ -533,23 +533,6 @@ namespace System.Runtime.Serialization private static Type s_typeOfXmlDataNode; internal static Type TypeOfXmlDataNode => s_typeOfXmlDataNode ?? (s_typeOfXmlDataNode = typeof(XmlDataNode)); -#if uapaot - private static Type s_typeOfSafeSerializationManager; - private static bool s_typeOfSafeSerializationManagerSet; - internal static Type TypeOfSafeSerializationManager - { - get - { - if (!s_typeOfSafeSerializationManagerSet) - { - s_typeOfSafeSerializationManager = TypeOfInt.Assembly.GetType("System.Runtime.Serialization.SafeSerializationManager"); - s_typeOfSafeSerializationManagerSet = true; - } - return s_typeOfSafeSerializationManager; - } - } -#endif - private static Type s_typeOfNullable; internal static Type TypeOfNullable { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonClassDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonClassDataContract.cs index 037884c..3e18001 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonClassDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonClassDataContract.cs @@ -20,9 +20,6 @@ namespace System.Runtime.Serialization.Json _helper = base.Helper as JsonClassDataContractCriticalHelper; } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private JsonFormatClassReaderDelegate CreateJsonFormatReaderDelegate() { return new ReflectionJsonClassReader(TraditionalClassDataContract).ReflectionReadClass; @@ -43,23 +40,9 @@ namespace System.Runtime.Serialization.Json { tempDelegate = CreateJsonFormatReaderDelegate(); } -#if uapaot - else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup) - { - tempDelegate = JsonDataContract.TryGetReadWriteDelegatesFromGeneratedAssembly(TraditionalClassDataContract)?.ClassReaderDelegate; - tempDelegate = tempDelegate ?? CreateJsonFormatReaderDelegate(); - - if (tempDelegate == null) - throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, TraditionalClassDataContract.UnderlyingType)); - } -#endif else { -#if uapaot - tempDelegate = JsonDataContract.GetReadWriteDelegatesFromGeneratedAssembly(TraditionalClassDataContract).ClassReaderDelegate; -#else tempDelegate = new JsonFormatReaderGenerator().GenerateClassReader(TraditionalClassDataContract); -#endif } Interlocked.MemoryBarrier(); @@ -71,9 +54,6 @@ namespace System.Runtime.Serialization.Json } } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private JsonFormatClassWriterDelegate CreateJsonFormatWriterDelegate() { return new ReflectionJsonFormatWriter().ReflectionWriteClass; @@ -94,23 +74,9 @@ namespace System.Runtime.Serialization.Json { tempDelegate = CreateJsonFormatWriterDelegate(); } -#if uapaot - else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup) - { - tempDelegate = JsonDataContract.TryGetReadWriteDelegatesFromGeneratedAssembly(TraditionalClassDataContract)?.ClassWriterDelegate; - tempDelegate = tempDelegate ?? CreateJsonFormatWriterDelegate(); - - if (tempDelegate == null) - throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, TraditionalClassDataContract.UnderlyingType)); - } -#endif else { -#if uapaot - tempDelegate = JsonDataContract.GetReadWriteDelegatesFromGeneratedAssembly(TraditionalClassDataContract).ClassWriterDelegate; -#else tempDelegate = new JsonFormatWriterGenerator().GenerateClassWriter(TraditionalClassDataContract); -#endif } Interlocked.MemoryBarrier(); diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonCollectionDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonCollectionDataContract.cs index 4724879..f036204 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonCollectionDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonCollectionDataContract.cs @@ -19,9 +19,6 @@ namespace System.Runtime.Serialization.Json _helper = base.Helper as JsonCollectionDataContractCriticalHelper; } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private JsonFormatCollectionReaderDelegate CreateJsonFormatReaderDelegate() { return new ReflectionJsonCollectionReader().ReflectionReadCollection; @@ -42,23 +39,9 @@ namespace System.Runtime.Serialization.Json { tempDelegate = CreateJsonFormatReaderDelegate(); } -#if uapaot - else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup) - { - tempDelegate = JsonDataContract.TryGetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract)?.CollectionReaderDelegate; - tempDelegate = tempDelegate ?? CreateJsonFormatReaderDelegate(); - - if (tempDelegate == null) - throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, TraditionalCollectionDataContract.UnderlyingType)); - } -#endif else { -#if uapaot - tempDelegate = JsonDataContract.GetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract).CollectionReaderDelegate; -#else tempDelegate = new JsonFormatReaderGenerator().GenerateCollectionReader(TraditionalCollectionDataContract); -#endif } Interlocked.MemoryBarrier(); @@ -70,9 +53,6 @@ namespace System.Runtime.Serialization.Json } } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private JsonFormatGetOnlyCollectionReaderDelegate CreateJsonFormatGetOnlyReaderDelegate() { return new ReflectionJsonCollectionReader().ReflectionReadGetOnlyCollection; @@ -99,23 +79,9 @@ namespace System.Runtime.Serialization.Json { tempDelegate = CreateJsonFormatGetOnlyReaderDelegate(); } -#if uapaot - else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup) - { - tempDelegate = JsonDataContract.TryGetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract)?.GetOnlyCollectionReaderDelegate; - tempDelegate = tempDelegate ?? CreateJsonFormatGetOnlyReaderDelegate(); - - if (tempDelegate == null) - throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, TraditionalCollectionDataContract.UnderlyingType)); - } -#endif else { -#if uapaot - tempDelegate = JsonDataContract.GetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract).GetOnlyCollectionReaderDelegate; -#else tempDelegate = new JsonFormatReaderGenerator().GenerateGetOnlyCollectionReader(TraditionalCollectionDataContract); -#endif } Interlocked.MemoryBarrier(); @@ -127,9 +93,6 @@ namespace System.Runtime.Serialization.Json } } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private JsonFormatCollectionWriterDelegate CreateJsonFormatWriterDelegate() { return new ReflectionJsonFormatWriter().ReflectionWriteCollection; @@ -151,23 +114,9 @@ namespace System.Runtime.Serialization.Json { tempDelegate = CreateJsonFormatWriterDelegate(); } -#if uapaot - else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup) - { - tempDelegate = JsonDataContract.TryGetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract)?.CollectionWriterDelegate; - tempDelegate = tempDelegate ?? CreateJsonFormatWriterDelegate(); - - if (tempDelegate == null) - throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, TraditionalCollectionDataContract.UnderlyingType)); - } -#endif else { -#if uapaot - tempDelegate = JsonDataContract.GetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract).CollectionWriterDelegate; -#else tempDelegate = new JsonFormatWriterGenerator().GenerateCollectionWriter(TraditionalCollectionDataContract); -#endif } Interlocked.MemoryBarrier(); diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonDataContract.cs index 2e232c8..f269171 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonDataContract.cs @@ -38,16 +38,7 @@ namespace System.Runtime.Serialization.Json // with the restructuring for multi-file, this is no longer true - instead // this has become a normal method JsonReadWriteDelegates result; -#if uapaot - // The c passed in could be a clone which is different from the original key, - // We'll need to get the original key data contract from generated assembly. - DataContract keyDc = (c?.UnderlyingType != null) ? - DataContract.GetDataContractFromGeneratedAssembly(c.UnderlyingType) - : null; - return (keyDc != null && JsonReadWriteDelegates.GetJsonDelegates().TryGetValue(keyDc, out result)) ? result : null; -#else return JsonReadWriteDelegates.GetJsonDelegates().TryGetValue(c, out result) ? result : null; -#endif } internal static JsonReadWriteDelegates GetReadWriteDelegatesFromGeneratedAssembly(DataContract c) @@ -312,11 +303,7 @@ namespace System.Runtime.Serialization.Json } } -#if uapaot - public class JsonReadWriteDelegates -#else internal class JsonReadWriteDelegates -#endif { // this is the global dictionary for JSON delegates introduced for multi-file private static Dictionary s_jsonDelegates = new Dictionary(); diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatReaderGenerator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatReaderGenerator.cs index 769edf1..f478185 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatReaderGenerator.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatReaderGenerator.cs @@ -5,14 +5,6 @@ using System; using System.Xml; -#if uapaot -namespace System.Runtime.Serialization.Json -{ - public delegate object JsonFormatClassReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContextComplexJson context, XmlDictionaryString emptyDictionaryString, XmlDictionaryString[] memberNames); - public delegate object JsonFormatCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContextComplexJson context, XmlDictionaryString emptyDictionaryString, XmlDictionaryString itemName, CollectionDataContract collectionContract); - public delegate void JsonFormatGetOnlyCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContextComplexJson context, XmlDictionaryString emptyDictionaryString, XmlDictionaryString itemName, CollectionDataContract collectionContract); -} -#else namespace System.Runtime.Serialization.Json { using System; @@ -1047,4 +1039,3 @@ namespace System.Runtime.Serialization.Json } } } -#endif diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatWriterGenerator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatWriterGenerator.cs index 47d0278..06f7361 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatWriterGenerator.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatWriterGenerator.cs @@ -5,13 +5,6 @@ using System; using System.Xml; -#if uapaot -namespace System.Runtime.Serialization.Json -{ - public delegate void JsonFormatClassWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContextComplexJson context, ClassDataContract dataContract, XmlDictionaryString[] memberNames); - public delegate void JsonFormatCollectionWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContextComplexJson context, CollectionDataContract dataContract); -} -#else namespace System.Runtime.Serialization.Json { using System; @@ -734,4 +727,3 @@ namespace System.Runtime.Serialization.Json } } } -#endif diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs index eaad576..365260e 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerReadContextComplexJson.cs @@ -14,11 +14,7 @@ using System.Diagnostics; namespace System.Runtime.Serialization.Json { -#if uapaot - public class XmlObjectSerializerReadContextComplexJson : XmlObjectSerializerReadContextComplex -#else internal class XmlObjectSerializerReadContextComplexJson : XmlObjectSerializerReadContextComplex -#endif { private string _extensionDataValueType; private DataContractJsonSerializer _jsonSerializer; @@ -306,7 +302,6 @@ namespace System.Runtime.Serialization.Json return name; } -#if !uapaot public static void ThrowDuplicateMemberException(object obj, XmlDictionaryString[] memberNames, int memberIndex) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SerializationException( @@ -344,6 +339,5 @@ namespace System.Runtime.Serialization.Json { return BitFlagsGenerator.IsBitSet(bytes, bitIndex); } -#endif } } diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs index 81704d1..fdc0776 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlObjectSerializerWriteContextComplexJson.cs @@ -13,11 +13,7 @@ using DataContractDictionary = System.Collections.Generic.Dictionary ReflectionCreateXmlSerializable(this.UnderlyingType); } -#else - get - { - if (DataContractSerializer.Option == SerializationOption.CodeGenOnly - || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _createXmlSerializableDelegate != null)) - { - return _createXmlSerializableDelegate; - } - - return () => ReflectionCreateXmlSerializable(this.UnderlyingType); - } - set - { - _createXmlSerializableDelegate = value; - } -#endif } internal override bool CanContainReferences => false; @@ -285,7 +258,6 @@ namespace System.Runtime.Serialization return ctor; } -#if !uapaot internal CreateXmlSerializableDelegate GenerateCreateXmlSerializableDelegate() { Type type = this.UnderlyingType; @@ -378,9 +350,7 @@ namespace System.Runtime.Serialization return false; } -#endif - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] internal IXmlSerializable ReflectionCreateXmlSerializable(Type type) { if (type.IsValueType) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatGeneratorStatics.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatGeneratorStatics.cs index bf3888b..35e157d 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatGeneratorStatics.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatGeneratorStatics.cs @@ -954,7 +954,6 @@ namespace System.Runtime.Serialization } } -#if !uapaot private static MethodInfo s_getTypeHandleMethod; internal static MethodInfo GetTypeHandleMethod { @@ -1038,6 +1037,5 @@ namespace System.Runtime.Serialization return s_collectionSerializationExceptionMessageProperty; } } -#endif } } \ No newline at end of file diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs index 50b4b25..3b963cc 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs @@ -15,7 +15,7 @@ using System.Runtime.CompilerServices; namespace System.Runtime.Serialization { -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public delegate object XmlFormatClassReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString[] memberNames, XmlDictionaryString[] memberNamespaces); public delegate object XmlFormatCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString itemName, XmlDictionaryString itemNamespace, CollectionDataContract collectionContract); public delegate void XmlFormatGetOnlyCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString itemName, XmlDictionaryString itemNamespace, CollectionDataContract collectionContract); @@ -58,7 +58,6 @@ namespace System.Runtime.Serialization /// private class CriticalHelper { -#if !uapaot private CodeGenerator _ilg; private LocalBuilder _objectLocal; private Type _objectType; @@ -67,11 +66,7 @@ namespace System.Runtime.Serialization private ArgBuilder _memberNamesArg; private ArgBuilder _memberNamespacesArg; private ArgBuilder _collectionContractArg; -#endif -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private XmlFormatClassReaderDelegate CreateReflectionXmlClassReader(ClassDataContract classContract) { return new ReflectionXmlClassReader(classContract).ReflectionReadClass; @@ -83,17 +78,8 @@ namespace System.Runtime.Serialization { return CreateReflectionXmlClassReader(classContract); } -#if uapaot - else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup) - { - return CreateReflectionXmlClassReader(classContract); - } -#endif else { -#if uapaot - throw new InvalidOperationException("Cannot generate class reader"); -#else _ilg = new CodeGenerator(); bool memberAccessFlag = classContract.RequiresMemberAccessForRead(null); try @@ -166,13 +152,9 @@ namespace System.Runtime.Serialization } } return (XmlFormatClassReaderDelegate)_ilg.EndMethod(); -#endif } } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private XmlFormatCollectionReaderDelegate CreateReflectionXmlCollectionReader() { return new ReflectionXmlCollectionReader().ReflectionReadCollection; @@ -184,29 +166,16 @@ namespace System.Runtime.Serialization { return CreateReflectionXmlCollectionReader(); } -#if uapaot - else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup) - { - return CreateReflectionXmlCollectionReader(); - } -#endif else { -#if uapaot - throw new InvalidOperationException("Cannot generate class reader"); -#else _ilg = GenerateCollectionReaderHelper(collectionContract, false /*isGetOnlyCollection*/); ReadCollection(collectionContract); _ilg.Load(_objectLocal); _ilg.ConvertValue(_objectLocal.LocalType, _ilg.CurrentMethod.ReturnType); return (XmlFormatCollectionReaderDelegate)_ilg.EndMethod(); -#endif } } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private XmlFormatGetOnlyCollectionReaderDelegate CreateReflectionReadGetOnlyCollectionReader() { return new ReflectionXmlCollectionReader().ReflectionReadGetOnlyCollection; @@ -218,25 +187,14 @@ namespace System.Runtime.Serialization { return CreateReflectionReadGetOnlyCollectionReader(); } -#if uapaot - else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup) - { - return CreateReflectionReadGetOnlyCollectionReader(); - } -#endif else { -#if uapaot - throw new InvalidOperationException("Cannot generate class reader"); -#else _ilg = GenerateCollectionReaderHelper(collectionContract, true /*isGetOnlyCollection*/); ReadGetOnlyCollection(collectionContract); return (XmlFormatGetOnlyCollectionReaderDelegate)_ilg.EndMethod(); -#endif } } -#if !uapaot private CodeGenerator GenerateCollectionReaderHelper(CollectionDataContract collectionContract, bool isGetOnlyCollection) { _ilg = new CodeGenerator(); @@ -975,7 +933,6 @@ namespace System.Runtime.Serialization _ilg.Call(XmlFormatGeneratorStatics.CreateSerializationExceptionMethod); _ilg.Throw(); } -#endif } internal static object UnsafeGetUninitializedObject(Type type) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatWriterGenerator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatWriterGenerator.cs index 21e2b13..7ffed43 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatWriterGenerator.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatWriterGenerator.cs @@ -15,7 +15,7 @@ using System.Runtime.CompilerServices; namespace System.Runtime.Serialization { -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public delegate void XmlFormatClassWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, ClassDataContract dataContract); public delegate void XmlFormatCollectionWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, CollectionDataContract dataContract); public sealed class XmlFormatWriterGenerator @@ -49,7 +49,7 @@ namespace System.Runtime.Serialization /// private class CriticalHelper { -#if !USE_REFEMIT && !uapaot +#if !USE_REFEMIT private CodeGenerator _ilg; private ArgBuilder _xmlWriterArg; private ArgBuilder _contextArg; @@ -64,9 +64,6 @@ namespace System.Runtime.Serialization private int _childElementIndex = 0; #endif -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private XmlFormatClassWriterDelegate CreateReflectionXmlFormatClassWriterDelegate() { return new ReflectionXmlFormatWriter().ReflectionWriteClass; @@ -78,15 +75,9 @@ namespace System.Runtime.Serialization { return CreateReflectionXmlFormatClassWriterDelegate(); } -#if uapaot - else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup) - { - return CreateReflectionXmlFormatClassWriterDelegate(); - } -#endif else { -#if USE_REFEMIT || uapaot +#if USE_REFEMIT throw new InvalidOperationException("Cannot generate class writer"); #else _ilg = new CodeGenerator(); @@ -113,9 +104,6 @@ namespace System.Runtime.Serialization } } -#if uapaot - [RemovableFeature(ReflectionBasedSerializationFeature.Name)] -#endif private XmlFormatCollectionWriterDelegate CreateReflectionXmlFormatCollectionWriterDelegate() { return new ReflectionXmlFormatWriter().ReflectionWriteCollection; @@ -127,15 +115,9 @@ namespace System.Runtime.Serialization { return CreateReflectionXmlFormatCollectionWriterDelegate(); } -#if uapaot - else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup) - { - return CreateReflectionXmlFormatCollectionWriterDelegate(); - } -#endif else { -#if USE_REFEMIT || uapaot +#if USE_REFEMIT throw new InvalidOperationException("Cannot generate class writer"); #else _ilg = new CodeGenerator(); @@ -162,7 +144,7 @@ namespace System.Runtime.Serialization } } -#if !USE_REFEMIT && !uapaot +#if !USE_REFEMIT private void InitArgs(Type objType) { _xmlWriterArg = _ilg.GetArg(0); diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs index 79292d3..e2a3ab1 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerContext.cs @@ -12,7 +12,7 @@ namespace System.Runtime.Serialization using System.Xml; using DataContractDictionary = System.Collections.Generic.Dictionary; -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public class XmlObjectSerializerContext #else internal class XmlObjectSerializerContext @@ -248,12 +248,6 @@ namespace System.Runtime.Serialization DataContract dataContract = PrimitiveDataContract.GetPrimitiveDataContract(typeName.Name, typeName.Namespace); if (dataContract == null) { -#if uapaot - if (typeName.Name == Globals.SafeSerializationManagerName && typeName.Namespace == Globals.SafeSerializationManagerNamespace && Globals.TypeOfSafeSerializationManager != null) - { - return GetDataContract(Globals.TypeOfSafeSerializationManager); - } -#endif dataContract = scopedKnownTypes.GetDataContract(typeName); if (dataContract == null) { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs index 09a521d..bdf6ed1 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs @@ -14,7 +14,7 @@ namespace System.Runtime.Serialization using System.Security; using DataContractDictionary = System.Collections.Generic.Dictionary; -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public class XmlObjectSerializerReadContext : XmlObjectSerializerContext #else internal class XmlObjectSerializerReadContext : XmlObjectSerializerContext @@ -82,14 +82,6 @@ namespace System.Runtime.Serialization throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NullValueReturnedForGetOnlyCollection, DataContract.GetClrTypeFullName(type)))); } -#if uapaot - // Referenced from generated code in .NET Native's SerializationAssemblyGenerator - internal static void ThrowNoDefaultConstructorForCollectionException(Type type) - { - throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NoDefaultConstructorForCollection, DataContract.GetClrTypeFullName(type)))); - } -#endif - #if USE_REFEMIT public static void ThrowArrayExceededSizeException(int arraySize, Type type) #else @@ -298,44 +290,6 @@ namespace System.Runtime.Serialization throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(xmlReader, SR.Format(SR.UnexpectedElementExpectingElements, xmlReader.NodeType, xmlReader.LocalName, xmlReader.NamespaceURI, stringBuilder.ToString())))); } -#if uapaot - public static void ThrowMissingRequiredMembers(object obj, XmlDictionaryString[] memberNames, byte[] expectedElements, byte[] requiredElements) - { - StringBuilder stringBuilder = new StringBuilder(); - int missingMembersCount = 0; - for (int i = 0; i < memberNames.Length; i++) - { - if (IsBitSet(expectedElements, i) && IsBitSet(requiredElements, i)) - { - if (stringBuilder.Length != 0) - stringBuilder.Append(", "); - stringBuilder.Append(memberNames[i]); - missingMembersCount++; - } - } - - if (missingMembersCount == 1) - { - throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.JsonOneRequiredMemberNotFound, DataContract.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString()))); - } - else - { - throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.JsonRequiredMembersNotFound, DataContract.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString()))); - } - } - - public static void ThrowDuplicateMemberException(object obj, XmlDictionaryString[] memberNames, int memberIndex) - { - throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.JsonDuplicateMemberInInput, DataContract.GetClrTypeFullName(obj.GetType()), memberNames[memberIndex]))); - } - - private static bool IsBitSet(byte[] bytes, int bitIndex) - { - throw new NotImplementedException(); - //return BitFlagsGenerator.IsBitSet(bytes, bitIndex); - } -#endif - protected void HandleMemberNotFound(XmlReaderDelegator xmlReader, ExtensionDataObject extensionData, int memberIndex) { xmlReader.MoveToContent(); diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContextComplex.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContextComplex.cs index 5ed8360..5baaaad 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContextComplex.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContextComplex.cs @@ -6,11 +6,7 @@ using System.Reflection; namespace System.Runtime.Serialization { -#if uapaot - public class XmlObjectSerializerReadContextComplex : XmlObjectSerializerReadContext -#else internal class XmlObjectSerializerReadContextComplex : XmlObjectSerializerReadContext -#endif { private bool _preserveObjectReferences; private SerializationMode _mode; diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs index 3d780f0..54396bd 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs @@ -14,13 +14,11 @@ using System.Collections.Generic; using System.Xml.Serialization; using System.Security; using System.Runtime.CompilerServices; -#if !uapaot using ExtensionDataObject = System.Object; -#endif namespace System.Runtime.Serialization { -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public class XmlObjectSerializerWriteContext : XmlObjectSerializerContext #else internal class XmlObjectSerializerWriteContext : XmlObjectSerializerContext @@ -57,7 +55,7 @@ namespace System.Runtime.Serialization _unsafeTypeForwardingEnabled = true; } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT internal ObjectToIdCache SerializedObjects #else protected ObjectToIdCache SerializedObjects @@ -186,21 +184,10 @@ namespace System.Runtime.Serialization DataContract dataContract; if (declaredType.IsInterface && CollectionDataContract.IsCollectionInterface(declaredType)) { -#if !uapaot dataContract = GetDataContractSkipValidation(DataContract.GetId(objectTypeHandle), objectTypeHandle, objectType); if (OnHandleIsReference(xmlWriter, dataContract, obj)) return; dataContract = GetDataContract(declaredTypeHandle, declaredType); -#else - dataContract = DataContract.GetDataContract(declaredType); - if (OnHandleIsReference(xmlWriter, dataContract, obj)) - return; - if (this.Mode == SerializationMode.SharedType && dataContract.IsValidContract(this.Mode)) - dataContract = dataContract.GetValidContract(this.Mode); - else - dataContract = GetDataContract(declaredTypeHandle, declaredType); - -#endif if (!WriteClrTypeInfo(xmlWriter, dataContract) && DataContractResolver != null) { if (objectType == null) @@ -266,7 +253,6 @@ namespace System.Runtime.Serialization knownTypesAddedInCurrentScope = true; } -#if !uapaot if (verifyKnownType) { if (!IsKnownType(dataContract, declaredType)) @@ -278,7 +264,7 @@ namespace System.Runtime.Serialization } } } -#endif + WriteDataContractValue(dataContract, xmlWriter, obj, declaredTypeHandle); if (knownTypesAddedInCurrentScope) @@ -307,7 +293,7 @@ namespace System.Runtime.Serialization return false; } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public virtual void WriteAnyType(XmlWriterDelegator xmlWriter, object value) #else internal virtual void WriteAnyType(XmlWriterDelegator xmlWriter, object value) @@ -316,7 +302,7 @@ namespace System.Runtime.Serialization xmlWriter.WriteAnyType(value); } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public virtual void WriteString(XmlWriterDelegator xmlWriter, string value) #else internal virtual void WriteString(XmlWriterDelegator xmlWriter, string value) @@ -324,7 +310,7 @@ namespace System.Runtime.Serialization { xmlWriter.WriteString(value); } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public virtual void WriteString(XmlWriterDelegator xmlWriter, string value, XmlDictionaryString name, XmlDictionaryString ns) #else internal virtual void WriteString(XmlWriterDelegator xmlWriter, string value, XmlDictionaryString name, XmlDictionaryString ns) @@ -340,7 +326,7 @@ namespace System.Runtime.Serialization } } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public virtual void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value) #else internal virtual void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value) @@ -348,7 +334,7 @@ namespace System.Runtime.Serialization { xmlWriter.WriteBase64(value); } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public virtual void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value, XmlDictionaryString name, XmlDictionaryString ns) #else internal virtual void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value, XmlDictionaryString name, XmlDictionaryString ns) @@ -364,7 +350,7 @@ namespace System.Runtime.Serialization } } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value) #else internal virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value) @@ -372,7 +358,7 @@ namespace System.Runtime.Serialization { xmlWriter.WriteUri(value); } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns) #else internal virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns) @@ -388,7 +374,7 @@ namespace System.Runtime.Serialization } } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public virtual void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value) #else internal virtual void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value) @@ -396,7 +382,7 @@ namespace System.Runtime.Serialization { xmlWriter.WriteQName(value); } -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public virtual void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value, XmlDictionaryString name, XmlDictionaryString ns) #else internal virtual void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value, XmlDictionaryString name, XmlDictionaryString ns) diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContextComplex.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContextComplex.cs index 9db31b0..00e4494 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContextComplex.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerWriteContextComplex.cs @@ -16,7 +16,7 @@ using System.Runtime.CompilerServices; namespace System.Runtime.Serialization { -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public class XmlObjectSerializerWriteContextComplex : XmlObjectSerializerWriteContext #else internal class XmlObjectSerializerWriteContextComplex : XmlObjectSerializerWriteContext @@ -53,31 +53,19 @@ namespace System.Runtime.Serialization return false; } -#if uapaot - public override void WriteAnyType(XmlWriterDelegator xmlWriter, object value) -#else internal override void WriteAnyType(XmlWriterDelegator xmlWriter, object value) -#endif { if (!OnHandleReference(xmlWriter, value, false /*canContainCyclicReference*/)) xmlWriter.WriteAnyType(value); } -#if uapaot - public override void WriteString(XmlWriterDelegator xmlWriter, string value) -#else internal override void WriteString(XmlWriterDelegator xmlWriter, string value) -#endif { if (!OnHandleReference(xmlWriter, value, false /*canContainCyclicReference*/)) xmlWriter.WriteString(value); } -#if uapaot - public override void WriteString(XmlWriterDelegator xmlWriter, string value, XmlDictionaryString name, XmlDictionaryString ns) -#else internal override void WriteString(XmlWriterDelegator xmlWriter, string value, XmlDictionaryString name, XmlDictionaryString ns) -#endif { if (value == null) WriteNull(xmlWriter, typeof(string), true/*isMemberTypeSerializable*/, name, ns); @@ -90,21 +78,13 @@ namespace System.Runtime.Serialization } } -#if uapaot - public override void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value) -#else internal override void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value) -#endif { if (!OnHandleReference(xmlWriter, value, false /*canContainCyclicReference*/)) xmlWriter.WriteBase64(value); } -#if uapaot - public override void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value, XmlDictionaryString name, XmlDictionaryString ns) -#else internal override void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value, XmlDictionaryString name, XmlDictionaryString ns) -#endif { if (value == null) WriteNull(xmlWriter, typeof(byte[]), true/*isMemberTypeSerializable*/, name, ns); @@ -117,21 +97,13 @@ namespace System.Runtime.Serialization } } -#if uapaot - public override void WriteUri(XmlWriterDelegator xmlWriter, Uri value) -#else internal override void WriteUri(XmlWriterDelegator xmlWriter, Uri value) -#endif { if (!OnHandleReference(xmlWriter, value, false /*canContainCyclicReference*/)) xmlWriter.WriteUri(value); } -#if uapaot - public override void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns) -#else internal override void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns) -#endif { if (value == null) WriteNull(xmlWriter, typeof(Uri), true/*isMemberTypeSerializable*/, name, ns); @@ -144,21 +116,13 @@ namespace System.Runtime.Serialization } } -#if uapaot - public override void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value) -#else internal override void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value) -#endif { if (!OnHandleReference(xmlWriter, value, false /*canContainCyclicReference*/)) xmlWriter.WriteQName(value); } -#if uapaot - public override void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value, XmlDictionaryString name, XmlDictionaryString ns) -#else internal override void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value, XmlDictionaryString name, XmlDictionaryString ns) -#endif { if (value == null) WriteNull(xmlWriter, typeof(XmlQualifiedName), true/*isMemberTypeSerializable*/, name, ns); diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlReaderDelegator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlReaderDelegator.cs index 8207096..c96a367 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlReaderDelegator.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlReaderDelegator.cs @@ -10,7 +10,7 @@ using System.Xml.Serialization; namespace System.Runtime.Serialization { -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public class XmlReaderDelegator #else internal class XmlReaderDelegator diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlWriterDelegator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlWriterDelegator.cs index 3a4bf6c..3b792c0 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlWriterDelegator.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlWriterDelegator.cs @@ -8,7 +8,7 @@ using System.Globalization; namespace System.Runtime.Serialization { -#if USE_REFEMIT || uapaot +#if USE_REFEMIT public class XmlWriterDelegator #else internal class XmlWriterDelegator diff --git a/src/libraries/System.Private.Reflection.Metadata.Ecma335/System.Private.Reflection.Metadata.Ecma335.sln b/src/libraries/System.Private.Reflection.Metadata.Ecma335/System.Private.Reflection.Metadata.Ecma335.sln index 62c84a5..840fdf6 100644 --- a/src/libraries/System.Private.Reflection.Metadata.Ecma335/System.Private.Reflection.Metadata.Ecma335.sln +++ b/src/libraries/System.Private.Reflection.Metadata.Ecma335/System.Private.Reflection.Metadata.Ecma335.sln @@ -11,12 +11,6 @@ Global Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}.Debug|Any CPU.ActiveCfg = uapaot-Windows_NT-Debug|Any CPU - {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}.Debug|Any CPU.Build.0 = uapaot-Windows_NT-Debug|Any CPU - {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}.Release|Any CPU.ActiveCfg = uapaot-Windows_NT-Release|Any CPU - {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}.Release|Any CPU.Build.0 = uapaot-Windows_NT-Release|Any CPU - EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection diff --git a/src/libraries/System.Private.Reflection.Metadata.Ecma335/src/System.Private.Reflection.Metadata.Ecma335.csproj b/src/libraries/System.Private.Reflection.Metadata.Ecma335/src/System.Private.Reflection.Metadata.Ecma335.csproj index 51f53c6..9fa2801 100644 --- a/src/libraries/System.Private.Reflection.Metadata.Ecma335/src/System.Private.Reflection.Metadata.Ecma335.csproj +++ b/src/libraries/System.Private.Reflection.Metadata.Ecma335/src/System.Private.Reflection.Metadata.Ecma335.csproj @@ -10,7 +10,6 @@ $(NoWarn);3021 $(DefineConstants);CORERT ..\..\System.Reflection.Metadata\src\ - uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release 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 420077c..37a2eac 100644 --- a/src/libraries/System.Private.Uri/src/System.Private.Uri.csproj +++ b/src/libraries/System.Private.Uri/src/System.Private.Uri.csproj @@ -45,9 +45,6 @@ - - - diff --git a/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj b/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj index b29d324..99881d0 100644 --- a/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj +++ b/src/libraries/System.Private.Xml.Linq/tests/events/System.Xml.Linq.Events.Tests.csproj @@ -17,7 +17,4 @@ - - - \ No newline at end of file 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 1c51ece..e465894 100644 --- a/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj +++ b/src/libraries/System.Private.Xml/src/System.Private.Xml.csproj @@ -5,9 +5,8 @@ System.Xml true $(NoWarn);CS1573;649;169;414 - true + true $(DefineConstants);FEATURE_COMPILED_XSL - $(DefineConstants);FEATURE_SERIALIZATION_UAPAOT;UAPAOT netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -561,9 +560,8 @@ XmlCharType.bin - - + @@ -809,7 +807,6 @@ - diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReader.cs index 77dbbe9..f36621e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReader.cs @@ -1849,11 +1849,7 @@ namespace System.Xml // NOTE: This method is called via reflection from System.Data.dll and from Analysis Services in Yukon. // Do not change its signature without notifying the appropriate teams! // !!!!!! -#if UAPAOT - public static XmlReader CreateSqlReader(Stream input, XmlReaderSettings settings, XmlParserContext inputContext) -#else internal static XmlReader CreateSqlReader(Stream input, XmlReaderSettings settings, XmlParserContext inputContext) -#endif { if (input == null) { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs index cba0483..daa4099 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs @@ -7,7 +7,6 @@ using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; -#if !FEATURE_SERIALIZATION_UAPAOT namespace System.Xml.Serialization { using System; @@ -1670,4 +1669,3 @@ namespace System.Xml.Serialization } } } -#endif diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs index ceeaa56..90a55e8 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs @@ -57,7 +57,6 @@ namespace System.Xml.Serialization internal TempAssembly(XmlMapping[] xmlMappings, Type[] types, string defaultNamespace, string location) { -#if !FEATURE_SERIALIZATION_UAPAOT bool containsSoapMapping = false; for (int i = 0; i < xmlMappings.Length; i++) { @@ -94,7 +93,6 @@ namespace System.Xml.Serialization { throw new PlatformNotSupportedException("Compiling JScript/CSharp scripts is not supported"); } -#endif #if DEBUG // use exception in the place of Debug.Assert to avoid throwing asserts from a server process such as aspnet_ewp.exe @@ -211,13 +209,11 @@ namespace System.Xml.Serialization return null; } -#if !FEATURE_SERIALIZATION_UAPAOT if (!IsSerializerVersionMatch(serializer, type, defaultNamespace)) { XmlSerializationEventSource.Log.XmlSerializerExpired(serializerName, type.FullName); return null; } -#endif } else { @@ -256,7 +252,6 @@ namespace System.Xml.Serialization return null; } -#if !FEATURE_SERIALIZATION_UAPAOT private static bool IsSerializerVersionMatch(Assembly serializer, Type type, string defaultNamespace) { if (serializer == null) @@ -516,7 +511,6 @@ namespace System.Xml.Serialization return writerType.Assembly; } -#endif private static MethodInfo GetMethodFromType(Type type, string methodName) { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compiler.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compiler.cs index 2ba30b7..95a1e39 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compiler.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compiler.cs @@ -26,7 +26,6 @@ namespace System.Xml.Serialization private bool _debugEnabled = DiagnosticsSwitches.KeepTempFiles.Enabled; private StringWriter _writer = new StringWriter(CultureInfo.InvariantCulture); -#if !FEATURE_SERIALIZATION_UAPAOT // SxS: This method does not take any resource name and does not expose any resources to the caller. // It's OK to suppress the SxS warning. internal void AddImport(Type type, Hashtable types) @@ -99,7 +98,6 @@ namespace System.Xml.Serialization { get { return _writer; } } -#endif internal static string GetTempAssemblyName(AssemblyName parent, string ns) { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs index b05b7db..a18f45f 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs @@ -2087,8 +2087,7 @@ namespace System.Xml.Serialization } } - // This class and it's contained members must be public so that reflection metadata is available on uapaot - public static class ReflectionXmlSerializationReaderHelper + internal static class ReflectionXmlSerializationReaderHelper { public delegate void SetMemberValueDelegate(object o, object val); diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SourceInfo.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SourceInfo.cs index 2c9f582..64327c5 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SourceInfo.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SourceInfo.cs @@ -10,7 +10,6 @@ using System.Reflection.Emit; using System.Text.RegularExpressions; using System.Xml.Extensions; -#if !FEATURE_SERIALIZATION_UAPAOT namespace System.Xml.Serialization { internal class SourceInfo @@ -263,4 +262,3 @@ namespace System.Xml.Serialization } } } -#endif diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs index 7f6b0bf..2d02155 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs @@ -726,7 +726,6 @@ namespace System.Xml.Serialization return typeDesc; } -#if !FEATURE_SERIALIZATION_UAPAOT internal TypeMapping GetTypeMappingFromTypeDesc(TypeDesc typeDesc) { foreach (TypeMapping typeMapping in TypeMappings) @@ -748,7 +747,6 @@ namespace System.Xml.Serialization } return null; } -#endif private TypeDesc ImportTypeDesc(Type type, MemberInfo memberInfo, bool directReference) { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs index f511e98..06459fe 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs @@ -25,7 +25,6 @@ namespace System.Xml.Serialization { } } -#if !FEATURE_SERIALIZATION_UAPAOT internal class XmlSerializationCodeGen { private IndentedWriter _writer; @@ -407,5 +406,4 @@ namespace System.Xml.Serialization return mapping.TypeDesc.CanBeElementValue; } } -#endif } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationILGen.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationILGen.cs index b294549..b29f8f7 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationILGen.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationILGen.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !FEATURE_SERIALIZATION_UAPAOT namespace System.Xml.Serialization { using System; @@ -595,5 +594,4 @@ namespace System.Xml.Serialization } } } -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReader.cs index 5a01178..7f84a5a 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReader.cs @@ -108,38 +108,6 @@ namespace System.Xml.Serialization protected abstract void InitIDs(); -#if FEATURE_SERIALIZATION_UAPAOT - // this method must be called before any generated deserialization methods are called - internal void Init(XmlReader r, XmlDeserializationEvents events, string encodingStyle) - { - _events = events; - _r = r; - _soap12 = (encodingStyle == Soap12.Encoding); - - _schemaNsID = r.NameTable.Add(XmlSchema.Namespace); - _schemaNs2000ID = r.NameTable.Add("http://www.w3.org/2000/10/XMLSchema"); - _schemaNs1999ID = r.NameTable.Add("http://www.w3.org/1999/XMLSchema"); - _schemaNonXsdTypesNsID = r.NameTable.Add(UrtTypes.Namespace); - _instanceNsID = r.NameTable.Add(XmlSchema.InstanceNamespace); - _instanceNs2000ID = r.NameTable.Add("http://www.w3.org/2000/10/XMLSchema-instance"); - _instanceNs1999ID = r.NameTable.Add("http://www.w3.org/1999/XMLSchema-instance"); - _soapNsID = r.NameTable.Add(Soap.Encoding); - _soap12NsID = r.NameTable.Add(Soap12.Encoding); - _schemaID = r.NameTable.Add("schema"); - _wsdlNsID = r.NameTable.Add(Wsdl.Namespace); - _wsdlArrayTypeID = r.NameTable.Add(Wsdl.ArrayType); - _nullID = r.NameTable.Add("null"); - _nilID = r.NameTable.Add("nil"); - _typeID = r.NameTable.Add("type"); - _arrayTypeID = r.NameTable.Add("arrayType"); - _itemTypeID = r.NameTable.Add("itemType"); - _arraySizeID = r.NameTable.Add("arraySize"); - _arrayID = r.NameTable.Add("Array"); - _urTypeID = r.NameTable.Add(Soap.UrType); - InitIDs(); - } -#endif - // this method must be called before any generated deserialization methods are called internal void Init(XmlReader r, XmlDeserializationEvents events, string encodingStyle, TempAssembly tempAssembly) { @@ -2074,7 +2042,6 @@ namespace System.Xml.Serialization /// public delegate object XmlSerializationReadCallback(); -#if !FEATURE_SERIALIZATION_UAPAOT internal class XmlSerializationReaderCodeGen : XmlSerializationCodeGen { private Hashtable _idNames = new Hashtable(); @@ -5173,5 +5140,4 @@ namespace System.Xml.Serialization RaCodeGen.WriteLocalDecl(typeFullName, variableName, initValue, useReflection); } } -#endif } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs index 22f0f1e..0abb643 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. -#if !FEATURE_SERIALIZATION_UAPAOT namespace System.Xml.Serialization { using System; @@ -3611,4 +3610,3 @@ namespace System.Xml.Serialization } } } -#endif diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriter.cs index 8cc842b..d5ae8ad 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriter.cs @@ -37,15 +37,6 @@ namespace System.Xml.Serialization private bool _soap12; private bool _escapeName = true; -#if FEATURE_SERIALIZATION_UAPAOT - // this method must be called before any generated serialization methods are called - internal void Init(XmlWriter w, XmlSerializerNamespaces namespaces, string encodingStyle, string idBase) - { - _w = w; - _namespaces = namespaces; - } -#endif - // this method must be called before any generated serialization methods are called internal void Init(XmlWriter w, XmlSerializerNamespaces namespaces, string encodingStyle, string idBase, TempAssembly tempAssembly) { @@ -1484,7 +1475,6 @@ namespace System.Xml.Serialization return (bool)oIsTypeDynamic; } -#if !FEATURE_SERIALIZATION_UAPAOT internal static bool IsTypeDynamic(Type[] arguments) { foreach (Type t in arguments) @@ -1524,22 +1514,18 @@ namespace System.Xml.Serialization } } } -#endif internal static Assembly Get(string fullName) { return s_nameToAssemblyMap != null ? (Assembly)s_nameToAssemblyMap[fullName] : null; } -#if !FEATURE_SERIALIZATION_UAPAOT internal static string GetName(Assembly a) { return s_assemblyToNameMap != null ? (string) s_assemblyToNameMap[a] : null; } -#endif } -#if !FEATURE_SERIALIZATION_UAPAOT internal class ReflectionAwareCodeGen { private const string hexDigits = "0123456789ABCDEF"; @@ -4426,5 +4412,4 @@ namespace System.Xml.Serialization return enumValue; } } -#endif } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs index a9e03ab..7ed07d3 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs @@ -13,7 +13,6 @@ using System.Text; using System.Xml.Schema; using System.Xml.Extensions; -#if !FEATURE_SERIALIZATION_UAPAOT namespace System.Xml.Serialization { internal class XmlSerializationWriterILGen : XmlSerializationILGen @@ -2633,4 +2632,3 @@ namespace System.Xml.Serialization } } } -#endif diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs index 821c050..ae00c6e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs @@ -99,11 +99,7 @@ namespace System.Xml.Serialization // of XmlSerializer, then any access to this enum would be treated by AOT compilers as access to the XmlSerializer // as well, which has a large static ctor which brings in a lot of code. So keeping the enum separate // makes sure that using just the enum itself doesn't bring in the whole of serialization code base. -#if FEATURE_SERIALIZATION_UAPAOT - public enum SerializationMode -#else internal enum SerializationMode -#endif { CodeGenOnly, ReflectionOnly, @@ -113,11 +109,7 @@ namespace System.Xml.Serialization public class XmlSerializer { -#if FEATURE_SERIALIZATION_UAPAOT - public static SerializationMode Mode { get; set; } = SerializationMode.ReflectionAsBackup; -#else internal static SerializationMode Mode { get; set; } = SerializationMode.ReflectionAsBackup; -#endif private static bool ReflectionMethodEnabled { @@ -134,12 +126,7 @@ namespace System.Xml.Serialization private Type _primitiveType; private XmlMapping _mapping; private XmlDeserializationEvents _events = new XmlDeserializationEvents(); -#if FEATURE_SERIALIZATION_UAPAOT - private XmlSerializer innerSerializer; - public string DefaultNamespace = null; -#else internal string DefaultNamespace = null; -#endif private Type _rootType; private bool _isReflectionBasedSerializer = false; @@ -191,9 +178,7 @@ namespace System.Xml.Serialization if (xmlTypeMapping == null) throw new ArgumentNullException(nameof(xmlTypeMapping)); -#if !FEATURE_SERIALIZATION_UAPAOT _tempAssembly = GenerateTempAssembly(xmlTypeMapping); -#endif _mapping = xmlTypeMapping; } @@ -215,7 +200,6 @@ namespace System.Xml.Serialization _primitiveType = type; return; } -#if !FEATURE_SERIALIZATION_UAPAOT _tempAssembly = s_cache[defaultNamespace, type]; if (_tempAssembly == null) { @@ -257,14 +241,6 @@ namespace System.Xml.Serialization { _mapping = XmlReflectionImporter.GetTopLevelMapping(type, defaultNamespace); } -#else - XmlSerializerImplementation contract = GetXmlSerializerContractFromGeneratedAssembly(); - - if (contract != null) - { - this.innerSerializer = contract.GetSerializer(type); - } -#endif } public XmlSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace, string location) @@ -275,9 +251,7 @@ namespace System.Xml.Serialization DefaultNamespace = defaultNamespace; _rootType = type; _mapping = GenerateXmlTypeMapping(type, overrides, extraTypes, root, defaultNamespace); -#if !FEATURE_SERIALIZATION_UAPAOT _tempAssembly = GenerateTempAssembly(_mapping, type, defaultNamespace, location); -#endif } private XmlTypeMapping GenerateXmlTypeMapping(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace) @@ -375,7 +349,6 @@ namespace System.Xml.Serialization { SerializeUsingReflection(xmlWriter, o, namespaces, encodingStyle, id); } -#if !FEATURE_SERIALIZATION_UAPAOT else if (_tempAssembly == null || _typedSerializer) { // The contion for the block is never true, thus the block is never hit. @@ -392,37 +365,6 @@ namespace System.Xml.Serialization } else _tempAssembly.InvokeWriter(_mapping, xmlWriter, o, namespaces == null || namespaces.Count == 0 ? DefaultNamespaces : namespaces, encodingStyle, id); -#else - else - { - if (this.innerSerializer != null) - { - if (!string.IsNullOrEmpty(this.DefaultNamespace)) - { - this.innerSerializer.DefaultNamespace = this.DefaultNamespace; - } - - XmlSerializationWriter writer = this.innerSerializer.CreateWriter(); - writer.Init(xmlWriter, namespaces == null || namespaces.Count == 0 ? DefaultNamespaces : namespaces, encodingStyle, id); - try - { - this.innerSerializer.Serialize(o, writer); - } - finally - { - writer.Dispose(); - } - } - else if (ReflectionMethodEnabled) - { - SerializeUsingReflection(xmlWriter, o, namespaces, encodingStyle, id); - } - else - { - throw new InvalidOperationException(SR.Format(SR.Xml_MissingSerializationCodeException, this._rootType, typeof(XmlSerializer).Name)); - } - } -#endif } catch (Exception e) { @@ -500,7 +442,6 @@ namespace System.Xml.Serialization { return DeserializeUsingReflection(xmlReader, encodingStyle, events); } -#if !FEATURE_SERIALIZATION_UAPAOT else if (_tempAssembly == null || _typedSerializer) { XmlSerializationReader reader = CreateReader(); @@ -518,38 +459,6 @@ namespace System.Xml.Serialization { return _tempAssembly.InvokeReader(_mapping, xmlReader, events, encodingStyle); } -#else - else - { - if (this.innerSerializer != null) - { - if (!string.IsNullOrEmpty(this.DefaultNamespace)) - { - this.innerSerializer.DefaultNamespace = this.DefaultNamespace; - } - - XmlSerializationReader reader = this.innerSerializer.CreateReader(); - reader.Init(xmlReader, events, encodingStyle); - try - { - return this.innerSerializer.Deserialize(reader); - } - finally - { - reader.Dispose(); - } - } - else if (ReflectionMethodEnabled) - { - return DeserializeUsingReflection(xmlReader, encodingStyle, events); - } - else - { - - throw new InvalidOperationException(SR.Format(SR.Xml_MissingSerializationCodeException, this._rootType, typeof(XmlSerializer).Name)); - } - } -#endif } catch (Exception e) { @@ -588,7 +497,6 @@ namespace System.Xml.Serialization TypeDesc typeDesc = (TypeDesc)TypeScope.PrimtiveTypes[_primitiveType]; return xmlReader.IsStartElement(typeDesc.DataType.Name, string.Empty); } -#if !FEATURE_SERIALIZATION_UAPAOT else if (_tempAssembly != null) { return _tempAssembly.CanRead(_mapping, xmlReader); @@ -597,16 +505,6 @@ namespace System.Xml.Serialization { return false; } -#else - if (this.innerSerializer != null) - { - return this.innerSerializer.CanDeserialize(xmlReader); - } - else - { - return ReflectionMethodEnabled; - } -#endif } public static XmlSerializer[] FromMappings(XmlMapping[] mappings) @@ -617,10 +515,6 @@ namespace System.Xml.Serialization public static XmlSerializer[] FromMappings(XmlMapping[] mappings, Type type) { if (mappings == null || mappings.Length == 0) return Array.Empty(); -#if FEATURE_SERIALIZATION_UAPAOT - XmlSerializer[] serializers = GetReflectionBasedSerializers(mappings, type); - return serializers; -#else bool anySoapMapping = false; foreach (var mapping in mappings) { @@ -683,7 +577,6 @@ namespace System.Xml.Serialization serializers[i] = (XmlSerializer)contract.TypedSerializers[mappings[i].Key]; return serializers; } -#endif } private static XmlSerializer[] GetReflectionBasedSerializers(XmlMapping[] mappings, Type type) @@ -700,7 +593,6 @@ namespace System.Xml.Serialization return serializers; } -#if !FEATURE_SERIALIZATION_UAPAOT internal static bool GenerateSerializer(Type[] types, XmlMapping[] mappings, Stream stream) { if (types == null || types.Length == 0) @@ -738,7 +630,6 @@ namespace System.Xml.Serialization return TempAssembly.GenerateSerializerToStream(mappings, types, null, assembly, new Hashtable(), stream); } -#endif private static XmlSerializer[] GetSerializersFromCache(XmlMapping[] mappings, Type type) { @@ -797,14 +688,6 @@ namespace System.Xml.Serialization if (types == null) return Array.Empty(); -#if FEATURE_SERIALIZATION_UAPAOT - var serializers = new XmlSerializer[types.Length]; - for (int i = 0; i < types.Length; i++) - { - serializers[i] = new XmlSerializer(types[i]); - } - return serializers; -#else XmlReflectionImporter importer = new XmlReflectionImporter(); XmlTypeMapping[] mappings = new XmlTypeMapping[types.Length]; for (int i = 0; i < types.Length; i++) @@ -812,32 +695,7 @@ namespace System.Xml.Serialization mappings[i] = importer.ImportTypeMapping(types[i]); } return FromMappings(mappings); -#endif - } - -#if FEATURE_SERIALIZATION_UAPAOT - // this the global XML serializer contract introduced for multi-file - private static XmlSerializerImplementation xmlSerializerContract; - - internal static XmlSerializerImplementation GetXmlSerializerContractFromGeneratedAssembly() - { - // hack to pull in SetXmlSerializerContract which is only referenced from the - // code injected by MainMethodInjector transform - // there's probably also a way to do this via [DependencyReductionRoot], - // but I can't get the compiler to find that... - if (xmlSerializerContract == null) - SetXmlSerializerContract(null); - - // this method body used to be rewritten by an IL transform - // with the restructuring for multi-file, it has become a regular method - return xmlSerializerContract; - } - - public static void SetXmlSerializerContract(XmlSerializerImplementation xmlSerializerImplementation) - { - xmlSerializerContract = xmlSerializerImplementation; } -#endif public static string GetXmlSerializerAssemblyName(Type type) { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/indentedWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/indentedWriter.cs index 737b88d..145ea0b 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/indentedWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/indentedWriter.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if !FEATURE_SERIALIZATION_UAPAOT namespace System.Xml.Serialization { using System.IO; @@ -73,4 +72,3 @@ namespace System.Xml.Serialization } } } -#endif diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XmlDownloadManager.cs b/src/libraries/System.Private.Xml/src/System/Xml/XmlDownloadManager.cs index abe0330..38be47f 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XmlDownloadManager.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XmlDownloadManager.cs @@ -47,12 +47,9 @@ namespace System.Xml } } - // This method is marked Removable because WebRequest has a lot of dependencies that will bloat - // self-contained distributions of .NET Apps. // This code is statically reachable from any place that uses XmlReaderSettings (i.e. every app that // does something XML related is going to have this in their transitive call graph). People rarely need // this functionality though. - [RemovableFeature("System.Xml.XmlUrlResolver.NonFileUrlSupport")] private static WebRequest CreateWebRequestOrThrowIfRemoved(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) { diff --git a/src/libraries/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj b/src/libraries/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj index 7e56496..5a4600a 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj +++ b/src/libraries/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj @@ -11,7 +11,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Private.Xml/tests/XmlSerializer/System.Xml.XmlSerializer.Tests.csproj b/src/libraries/System.Private.Xml/tests/XmlSerializer/System.Xml.XmlSerializer.Tests.csproj index fcec6f5..c503c29 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSerializer/System.Xml.XmlSerializer.Tests.csproj +++ b/src/libraries/System.Private.Xml/tests/XmlSerializer/System.Xml.XmlSerializer.Tests.csproj @@ -11,7 +11,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Reflection.Primitives/src/ApiCompatBaseline.uapaot.txt b/src/libraries/System.Reflection.Primitives/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index fe64061..0000000 --- a/src/libraries/System.Reflection.Primitives/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,5 +0,0 @@ -Compat issues with assembly System.Reflection.Primitives: -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.Emit.OpCode' in the contract but not the implementation. -CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.OpCode' does not implement interface 'System.IEquatable' in the implementation but it does in the contract. -TypeCannotChangeClassification : Type 'System.Reflection.Emit.OpCode' is marked as readonly in the contract so it must also be marked readonly in the implementation. -Total Issues: 3 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 27c2744..17f381a 100644 --- a/src/libraries/System.Reflection.TypeExtensions/src/System.Reflection.TypeExtensions.csproj +++ b/src/libraries/System.Reflection.TypeExtensions/src/System.Reflection.TypeExtensions.csproj @@ -16,7 +16,7 @@ - + diff --git a/src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/MemberInfoTests.CoreCLR.cs b/src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/MemberInfoTests.cs similarity index 100% rename from src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/MemberInfoTests.CoreCLR.cs rename to src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/MemberInfoTests.cs diff --git a/src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/ModuleTests.CoreCLR.cs b/src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/ModuleTests.cs similarity index 100% rename from src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/ModuleTests.CoreCLR.cs rename to src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/ModuleTests.cs diff --git a/src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/System.Reflection.TypeExtensions.CoreCLR.Tests.csproj b/src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/System.Reflection.TypeExtensions.CoreCLR.Tests.csproj index 0a111d0..d81f521 100644 --- a/src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/System.Reflection.TypeExtensions.CoreCLR.Tests.csproj +++ b/src/libraries/System.Reflection.TypeExtensions/tests/CoreCLR/System.Reflection.TypeExtensions.CoreCLR.Tests.csproj @@ -10,10 +10,7 @@ - - - - - + + \ No newline at end of file diff --git a/src/libraries/System.Reflection/src/ApiCompatBaseline.uapaot.txt b/src/libraries/System.Reflection/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index 88a2b95..0000000 --- a/src/libraries/System.Reflection/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,6 +0,0 @@ -Compat issues with assembly System.Reflection: -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeNamedArgument' in the contract but not the implementation. -TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeNamedArgument' is marked as readonly in the contract so it must also be marked readonly in the implementation. -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeTypedArgument' in the contract but not the implementation. -TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeTypedArgument' is marked as readonly in the contract so it must also be marked readonly in the implementation. -Total Issues: 4 diff --git a/src/libraries/System.Reflection/tests/AssemblyNameTests.cs b/src/libraries/System.Reflection/tests/AssemblyNameTests.cs index d0085a1..73dd41e 100644 --- a/src/libraries/System.Reflection/tests/AssemblyNameTests.cs +++ b/src/libraries/System.Reflection/tests/AssemblyNameTests.cs @@ -224,7 +224,7 @@ namespace System.Reflection.Tests } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "AssemblyName.GetAssemblyName() not supported on UapAot")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "AssemblyName.GetAssemblyName() not supported on UWP")] public static void GetAssemblyName() { AssertExtensions.Throws("assemblyFile", () => AssemblyName.GetAssemblyName(null)); @@ -246,7 +246,7 @@ namespace System.Reflection.Tests } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "AssemblyName.GetAssemblyName() not supported on UapAot")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "AssemblyName.GetAssemblyName() not supported on UWP")] public static void GetAssemblyName_LockedFile() { using (var tempFile = new TempFile(Path.GetTempFileName(), 100)) @@ -575,15 +575,6 @@ namespace System.Reflection.Tests Assert.Throws(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_0, Version=1.1.1.1"))); Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_3, Version=1.1.1.1"))); - Constructor_String_LoadVersionTest_ReferenceVersionAssemblies(); - } - - [MethodImpl(MethodImplOptions.NoInlining)] // delay type loading so that the test above can run first - private static void Constructor_String_LoadVersionTest_ReferenceVersionAssemblies() - { - // The purpose of this function is only to have a static reference to each of the test assemblies required by - // Constructor_String_LoadVersionTest so that the compiler does not optimize away the project references and ILC can - // include them in the closure. Otherwise, the test does not work on UapAot. Assert.NotNull(typeof(AssemblyVersion.Program_0_0_0_0)); Assert.NotNull(typeof(AssemblyVersion.Program_1_0_0_0)); Assert.NotNull(typeof(AssemblyVersion.Program_1_1_0_0)); diff --git a/src/libraries/System.Reflection/tests/AssemblyTests.cs b/src/libraries/System.Reflection/tests/AssemblyTests.cs index 3cfb185..d34b9f9 100644 --- a/src/libraries/System.Reflection/tests/AssemblyTests.cs +++ b/src/libraries/System.Reflection/tests/AssemblyTests.cs @@ -34,7 +34,7 @@ namespace System.Reflection.Tests public AssemblyTests() { - // Assembly.Location not supported (properly) on uapaot. + // Assembly.Location does not return the file path for single-file deployment targets. DestTestAssemblyPath = Path.Combine(base.TestDirectory, "TestAssembly.dll"); LoadFromTestPath = Path.Combine(base.TestDirectory, "System.Reflection.Tests.dll"); File.Copy(SourceTestAssemblyPath, DestTestAssemblyPath); @@ -287,7 +287,7 @@ namespace System.Reflection.Tests } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile() not supported on UapAot")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile() not supported on UWP")] public void LoadFile() { Assembly currentAssembly = typeof(AssemblyTests).Assembly; @@ -321,7 +321,7 @@ namespace System.Reflection.Tests } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile() not supported on UapAot")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile() not supported on UWP")] public void LoadFile_NoSuchPath_ThrowsArgumentException() { AssertExtensions.Throws("path", null, () => Assembly.LoadFile("System.Runtime.Tests.dll")); @@ -624,7 +624,7 @@ namespace System.Reflection.Tests } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UapAot")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UWP")] public void AssemblyLoadFromBytes() { Assembly assembly = typeof(AssemblyTests).Assembly; @@ -636,7 +636,7 @@ namespace System.Reflection.Tests } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UapAot")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UWP")] public void AssemblyLoadFromBytesNeg() { Assert.Throws(() => Assembly.Load((byte[])null)); @@ -644,7 +644,7 @@ namespace System.Reflection.Tests } [Fact] - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UapAot")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UWP")] public void AssemblyLoadFromBytesWithSymbols() { Assembly assembly = typeof(AssemblyTests).Assembly; @@ -656,14 +656,14 @@ namespace System.Reflection.Tests Assert.Equal(assembly.FullName, loadedAssembly.FullName); } - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UapAot")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UWP")] public void AssemblyReflectionOnlyLoadFromString() { AssemblyName an = typeof(AssemblyTests).Assembly.GetName(); Assert.Throws(() => Assembly.ReflectionOnlyLoad(an.FullName)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UapAot")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UWP")] public void AssemblyReflectionOnlyLoadFromBytes() { Assembly assembly = typeof(AssemblyTests).Assembly; @@ -671,7 +671,7 @@ namespace System.Reflection.Tests Assert.Throws(() => Assembly.ReflectionOnlyLoad(aBytes)); } - [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UapAot")] + [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UWP")] public void AssemblyReflectionOnlyLoadFromNeg() { Assert.Throws(() => Assembly.ReflectionOnlyLoad((string)null)); diff --git a/src/libraries/System.Reflection/tests/CoreCLR/AssemblyTests.CoreCLR.cs b/src/libraries/System.Reflection/tests/CoreCLR/AssemblyTests.cs similarity index 100% rename from src/libraries/System.Reflection/tests/CoreCLR/AssemblyTests.CoreCLR.cs rename to src/libraries/System.Reflection/tests/CoreCLR/AssemblyTests.cs diff --git a/src/libraries/System.Reflection/tests/CoreCLR/System.Reflection.CoreCLR.Tests.csproj b/src/libraries/System.Reflection/tests/CoreCLR/System.Reflection.CoreCLR.Tests.csproj index 578f08c..f0896c4 100644 --- a/src/libraries/System.Reflection/tests/CoreCLR/System.Reflection.CoreCLR.Tests.csproj +++ b/src/libraries/System.Reflection/tests/CoreCLR/System.Reflection.CoreCLR.Tests.csproj @@ -5,7 +5,7 @@ true - + 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 a45ee47..c07036f 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 @@ -4,7 +4,7 @@ {F8C8FBFC-CA6E-4BDA-A1B3-FA4E17C10D9E} netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - + diff --git a/src/libraries/System.Runtime.Extensions/src/ApiCompatBaseline.uapaot.txt b/src/libraries/System.Runtime.Extensions/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index c97156a..0000000 --- a/src/libraries/System.Runtime.Extensions/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,8 +0,0 @@ -MembersMustExist : Member 'System.MidpointRounding System.MidpointRounding.ToNegativeInfinity' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MidpointRounding System.MidpointRounding.ToPositiveInfinity' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.MidpointRounding System.MidpointRounding.ToZero' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Numerics.BitOperations' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.IO.Path.EndsInDirectorySeparator(System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.IO.Path.EndsInDirectorySeparator(System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.IO.Path.TrimEndingDirectorySeparator(System.ReadOnlySpan)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.IO.Path.TrimEndingDirectorySeparator(System.String)' does not exist in the implementation but it does exist in the contract. \ No newline at end of file diff --git a/src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj b/src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj index 9bd9bda..99d2564 100644 --- a/src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj +++ b/src/libraries/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj @@ -6,7 +6,6 @@ true true true - true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release enable @@ -55,7 +54,7 @@ Common\CoreLib\Interop\Windows\Interop.BOOL.cs - + @@ -184,13 +183,10 @@ - + - - - 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 82bf7b4..7afa26f 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 @@ -31,7 +31,7 @@ Common\Interop\Unix\Interop.Libraries.cs - + Common\Interop\Windows\NtDll\Interop.RtlGetVersion.cs diff --git a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.Windows.cs b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.Windows.cs index 8ca7908..21c14c5 100644 --- a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.Windows.cs +++ b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.Windows.cs @@ -25,7 +25,7 @@ namespace System.Runtime.InteropServices { if (null == s_osDescription) { -#if uap || uapaot // all these are subject to WACK +#if uap // all these are subject to WACK s_osDescription = "Microsoft Windows"; #else s_osDescription = Interop.NtDll.RtlGetVersion(); diff --git a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.cs b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.cs index 1d180e5..6a91c1e 100644 --- a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.cs +++ b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.cs @@ -9,12 +9,7 @@ namespace System.Runtime.InteropServices { public static partial class RuntimeInformation { -#if uapaot - private const string FrameworkName = ".NET Native"; -#else // uap || netcoreapp private const string FrameworkName = ".NET Core"; -#endif - private static string s_frameworkDescription; public static string FrameworkDescription diff --git a/src/libraries/System.Runtime.InteropServices.WindowsRuntime/src/System.Runtime.InteropServices.WindowsRuntime.csproj b/src/libraries/System.Runtime.InteropServices.WindowsRuntime/src/System.Runtime.InteropServices.WindowsRuntime.csproj index 041c025..8176709 100644 --- a/src/libraries/System.Runtime.InteropServices.WindowsRuntime/src/System.Runtime.InteropServices.WindowsRuntime.csproj +++ b/src/libraries/System.Runtime.InteropServices.WindowsRuntime/src/System.Runtime.InteropServices.WindowsRuntime.csproj @@ -6,7 +6,6 @@ netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - diff --git a/src/libraries/System.Runtime.InteropServices/src/ApiCompatBaseline.uapaot.txt b/src/libraries/System.Runtime.InteropServices/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index 0c4e9a7..0000000 --- a/src/libraries/System.Runtime.InteropServices/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,21 +0,0 @@ -Compat issues with assembly System.Runtime.InteropServices: -CannotRemoveBaseTypeOrInterface : Type 'System.IO.UnmanagedMemoryStream' does not inherit from base type 'System.MarshalByRefObject' in the implementation but it does in the contract. -TypesMustExist : Type 'System.Runtime.InteropServices.DllImportResolver' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GenerateGuidForType(System.Type)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GenerateProgIdForType(System.Type)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetComObjectData(System.Object, System.Object)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetHINSTANCE(System.Reflection.Module)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetIDispatchForObject(System.Object)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetTypedObjectForIUnknown(System.IntPtr, System.Type)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.PtrToStringUTF8(System.IntPtr)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.PtrToStringUTF8(System.IntPtr, System.Int32)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.SetComObjectData(System.Object, System.Object, System.Object)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.StringToCoTaskMemUTF8(System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.ZeroFreeCoTaskMemUTF8(System.IntPtr)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.UnmanagedType System.Runtime.InteropServices.UnmanagedType.LPUTF8Str' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetExceptionPointers()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetEndComSlot(System.Type)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.IsTypeVisibleFromCom(System.Type)' does not exist in the implementation but it does exist in the contract. -TypeCannotChangeClassification : Type 'System.Runtime.InteropServices.HandleRef' is marked as readonly in the contract so it must also be marked readonly in the implementation. -TypesMustExist : Type 'System.Runtime.InteropServices.NativeLibrary' does not exist in the implementation but it does exist in the contract. -Total Issues: 19 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 33a86d8..1d1cc85 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj +++ b/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj @@ -4,8 +4,6 @@ System.Runtime.InteropServices Library true - true - $(NoWarn);0436;3001 true enable netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release @@ -22,17 +20,17 @@ - - - - - + + + + + - + - - - + + + @@ -42,7 +40,7 @@ - + @@ -68,10 +66,4 @@ - - - - $(TargetGroup) - - diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/BindToMonikerTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/BindToMonikerTests.cs index 9bd9109..5d034c9 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/BindToMonikerTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/BindToMonikerTests.cs @@ -15,7 +15,7 @@ namespace System.Runtime.InteropServices.Tests Assert.Throws(() => Marshal.BindToMoniker(null)); } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNative))] + [Theory] [PlatformSpecific(TestPlatforms.Windows)] [InlineData(null)] [InlineData("")] diff --git a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ChangeWrapperHandleStrengthTests.cs b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ChangeWrapperHandleStrengthTests.cs index b691ea2..0826915 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ChangeWrapperHandleStrengthTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ChangeWrapperHandleStrengthTests.cs @@ -34,7 +34,7 @@ namespace System.Runtime.InteropServices.Tests yield return new object[] { d }; } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNative))] + [Theory] [PlatformSpecific(TestPlatforms.Windows)] [MemberData(nameof(ChangeWrapperHandleStrength_TestData))] public void ChangeWrapperHandleStrength_ValidObject_Success(object otp) @@ -43,7 +43,7 @@ namespace System.Runtime.InteropServices.Tests Marshal.ChangeWrapperHandleStrength(otp, fIsWeak: false); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNative))] + [Fact] [PlatformSpecific(TestPlatforms.Windows)] public void ChangeWrapperHandleStrength_NullObject_ThrowsArgumentNullException() { diff --git a/src/libraries/System.Runtime.Loader/src/ApiCompatBaseline.uapaot.txt b/src/libraries/System.Runtime.Loader/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index 2ed8d5f..0000000 --- a/src/libraries/System.Runtime.Loader/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,35 +0,0 @@ -Compat issues with assembly System.Runtime.Loader: -CannotMakeTypeAbstract : Type 'System.Runtime.Loader.AssemblyLoadContext' is abstract in the implementation but is not abstract in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext..ctor(System.Boolean)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext..ctor(System.String, System.Boolean)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.add_Resolving(System.Func)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.add_ResolvingUnmanagedDll(System.Func)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.add_Unloading(System.Action)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.All.get()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.Assemblies.get()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.Default.get()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.GetAssemblyName(System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(System.Reflection.Assembly)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.IsCollectible.get()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.Load(System.Reflection.AssemblyName)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(System.Reflection.AssemblyName)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadFromNativeImagePath(System.String, System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadFromStream(System.IO.Stream)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadFromStream(System.IO.Stream, System.IO.Stream)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDll(System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.Name.get()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.remove_Resolving(System.Func)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.remove_ResolvingUnmanagedDll(System.Func)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.remove_Unloading(System.Action)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.SetProfileOptimizationRoot(System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.StartProfileOptimization(System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.Unload()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext.get()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.EnterContextualReflection()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.EnterContextualReflection(System.Reflection.Assembly)' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Reflection.Metadata.AssemblyExtensions' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Runtime.Loader.AssemblyDependencyResolver' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope' does not exist in the implementation but it does exist in the contract. -Total Issues: 33 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 456bdd9..59ce57e 100644 --- a/src/libraries/System.Runtime.Loader/src/System.Runtime.Loader.csproj +++ b/src/libraries/System.Runtime.Loader/src/System.Runtime.Loader.csproj @@ -2,7 +2,6 @@ System.Runtime.Loader true - true {485A65F0-51C9-4B95-A7A8-A4860C231E67} netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release 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 6a8695c..ad8e57f 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 @@ -67,7 +67,4 @@ - - - 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 e3e1681..aa7e04a 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 @@ -33,9 +33,6 @@ Common\System\ThreadCultureChange.cs - - - diff --git a/src/libraries/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.CoreCLR.cs b/src/libraries/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.CoreCLR.cs deleted file mode 100644 index ce5cc27..0000000 --- a/src/libraries/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.CoreCLR.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using SerializationTypes.CoreCLR; -using System; -using System.IO; -using System.Runtime.Serialization; -using Xunit; - -public static partial class DataContractJsonSerializerTests -{ - [Fact] - public static void DCJS_DifferentCollectionsOfSameTypeAsKnownTypes() - { - Assert.Throws(() => { - (new DataContractSerializer(typeof(TypeWithKnownTypesOfCollectionsWithConflictingXmlName))).WriteObject(new MemoryStream(), new TypeWithKnownTypesOfCollectionsWithConflictingXmlName()); - }); - } -} diff --git a/src/libraries/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.cs b/src/libraries/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.cs index 2f6a491..d1b5913 100644 --- a/src/libraries/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.cs +++ b/src/libraries/System.Runtime.Serialization.Json/tests/DataContractJsonSerializer.cs @@ -2961,6 +2961,14 @@ public static partial class DataContractJsonSerializerTests } } + [Fact] + public static void DCJS_DifferentCollectionsOfSameTypeAsKnownTypes() + { + Assert.Throws(() => { + (new DataContractSerializer(typeof(TypeWithKnownTypesOfCollectionsWithConflictingXmlName))).WriteObject(new MemoryStream(), new TypeWithKnownTypesOfCollectionsWithConflictingXmlName()); + }); + } + private static T SerializeAndDeserialize(T value, string baseline, DataContractJsonSerializerSettings settings = null, Func serializerFactory = null, bool skipStringCompare = false) { DataContractJsonSerializer dcjs; diff --git a/src/libraries/System.Runtime.Serialization.Json/tests/ReflectionOnly/System.Runtime.Serialization.Json.ReflectionOnly.Tests.csproj b/src/libraries/System.Runtime.Serialization.Json/tests/ReflectionOnly/System.Runtime.Serialization.Json.ReflectionOnly.Tests.csproj index 2373604..7284e45 100644 --- a/src/libraries/System.Runtime.Serialization.Json/tests/ReflectionOnly/System.Runtime.Serialization.Json.ReflectionOnly.Tests.csproj +++ b/src/libraries/System.Runtime.Serialization.Json/tests/ReflectionOnly/System.Runtime.Serialization.Json.ReflectionOnly.Tests.csproj @@ -8,11 +8,6 @@ - - - - - \ No newline at end of file diff --git a/src/libraries/System.Runtime.Serialization.Json/tests/System.Runtime.Serialization.Json.Tests.csproj b/src/libraries/System.Runtime.Serialization.Json/tests/System.Runtime.Serialization.Json.Tests.csproj index 26aebd3..f3026a5 100644 --- a/src/libraries/System.Runtime.Serialization.Json/tests/System.Runtime.Serialization.Json.Tests.csproj +++ b/src/libraries/System.Runtime.Serialization.Json/tests/System.Runtime.Serialization.Json.Tests.csproj @@ -5,8 +5,6 @@ - - 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 5caa48b..58300a2 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 @@ -25,7 +25,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.CoreCLR.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.CoreCLR.cs deleted file mode 100644 index ce14809..0000000 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.CoreCLR.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using SerializationTypes.CoreCLR; -using System; -using System.IO; -using System.Runtime.Serialization; -using Xunit; - -public static partial class DataContractSerializerTests -{ - [Fact] - public static void DCS_DifferentCollectionsOfSameTypeAsKnownTypes() - { - Assert.Throws(() => { - (new DataContractSerializer(typeof(TypeWithKnownTypesOfCollectionsWithConflictingXmlName))).WriteObject(new MemoryStream(), new TypeWithKnownTypesOfCollectionsWithConflictingXmlName()); - }); - } -} diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs index aa7e072..82b03d4 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs @@ -4084,6 +4084,14 @@ public static partial class DataContractSerializerTests Assert.NotNull(actual); } + [Fact] + public static void DCS_DifferentCollectionsOfSameTypeAsKnownTypes() + { + Assert.Throws(() => { + (new DataContractSerializer(typeof(TypeWithKnownTypesOfCollectionsWithConflictingXmlName))).WriteObject(new MemoryStream(), new TypeWithKnownTypesOfCollectionsWithConflictingXmlName()); + }); + } + private static T DeserializeString(string stringToDeserialize, bool shouldReportDeserializationExceptions = true, DataContractSerializerSettings settings = null, Func serializerFactory = null) { DataContractSerializer dcs; diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/ReflectionOnly/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.csproj b/src/libraries/System.Runtime.Serialization.Xml/tests/ReflectionOnly/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.csproj index 7480d81..69fd36a 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/ReflectionOnly/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.csproj +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/ReflectionOnly/System.Runtime.Serialization.Xml.ReflectionOnly.Tests.csproj @@ -13,8 +13,6 @@ - - Common\System\IO\TempFile.cs @@ -64,7 +62,4 @@ SerializationTestTypes\SelfRefAndCycles.cs - - - \ No newline at end of file diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.CoreCLR.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.CoreCLR.cs deleted file mode 100644 index 4dcf445..0000000 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.CoreCLR.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace SerializationTypes.CoreCLR -{ - [KnownType(typeof(List))] - [KnownType(typeof(SimpleType[]))] - [DataContract] - public class TypeWithKnownTypesOfCollectionsWithConflictingXmlName - { - [DataMember] - public object Value1 = new List(); - - [DataMember] - public object Value2 = new SimpleType[1]; - - } -} diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs index 7e41d5c..8a2da55 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs @@ -839,6 +839,18 @@ namespace SerializationTypes public string StringField2; } + [KnownType(typeof(List))] + [KnownType(typeof(SimpleType[]))] + [DataContract] + public class TypeWithKnownTypesOfCollectionsWithConflictingXmlName + { + [DataMember] + public object Value1 = new List(); + + [DataMember] + public object Value2 = new SimpleType[1]; + + } } public class TypeWithXmlElementProperty diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/System.Runtime.Serialization.Xml.Tests.csproj b/src/libraries/System.Runtime.Serialization.Xml/tests/System.Runtime.Serialization.Xml.Tests.csproj index f379758..b1f8911 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/System.Runtime.Serialization.Xml.Tests.csproj +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/System.Runtime.Serialization.Xml.Tests.csproj @@ -16,8 +16,6 @@ - - Common\System\IO\TempFile.cs @@ -35,7 +33,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Runtime.WindowsRuntime.UI.Xaml/src/System.Runtime.WindowsRuntime.UI.Xaml.csproj b/src/libraries/System.Runtime.WindowsRuntime.UI.Xaml/src/System.Runtime.WindowsRuntime.UI.Xaml.csproj index 3f393d8..42308f6 100644 --- a/src/libraries/System.Runtime.WindowsRuntime.UI.Xaml/src/System.Runtime.WindowsRuntime.UI.Xaml.csproj +++ b/src/libraries/System.Runtime.WindowsRuntime.UI.Xaml/src/System.Runtime.WindowsRuntime.UI.Xaml.csproj @@ -37,9 +37,6 @@ - - - diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj b/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj index 1155e7e..c1d0f83 100644 --- a/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj +++ b/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj @@ -3,14 +3,13 @@ true $(NoWarn);CS1573 true - true $(NoWarn);1698;0436 {844A2A0B-4169-49C3-B367-AFDC4894E487} netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;netstandard1.2-Debug;netstandard1.2-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - + $(DefineConstants);netstandard;FEATURE_APPX @@ -19,7 +18,7 @@ 4.0.0.0 4.0.11.0 - + @@ -33,64 +32,16 @@ - - - - - - - uapaot - - - System_Runtime_Extensions - uapaot - - - - - + + + - + - - - Common\Interop\Windows\Mincore\Interop.RoGetActivationFactory.cs - - - Common\System\Runtime\InteropServices\WindowsRuntime\WindowsRuntimeImportAttribute.cs - + - - - - - - - - - - Common\System\WinRTFolderPaths.cs - - - Common\Interop\Windows\kernel32\Interop.ResolveLocaleName.cs - - - Common\Interop\Windows\kernel32\Interop.FormatMessage.cs - - - Common\Interop\Windows\Mincore\Interop.RoGetBufferMarshaler.cs - - - Common\Interop\Windows\Interop.Libraries.cs - - - Common\Interop\Windows\Interop.Errors.cs - - - Common\CoreLib\System\IO\Win32Marshal.cs - @@ -98,7 +49,6 @@ - @@ -122,6 +72,33 @@ + + Common\Interop\Windows\Mincore\Interop.RoGetActivationFactory.cs + + + Common\System\Runtime\InteropServices\WindowsRuntime\WindowsRuntimeImportAttribute.cs + + + Common\System\WinRTFolderPaths.cs + + + Common\Interop\Windows\kernel32\Interop.ResolveLocaleName.cs + + + Common\Interop\Windows\kernel32\Interop.FormatMessage.cs + + + Common\Interop\Windows\Mincore\Interop.RoGetBufferMarshaler.cs + + + Common\Interop\Windows\Interop.Libraries.cs + + + Common\Interop\Windows\Interop.Errors.cs + + + Common\CoreLib\System\IO\Win32Marshal.cs + diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.CoreCLR.cs b/src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.CoreCLR.cs deleted file mode 100644 index fff1ba1..0000000 --- a/src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.CoreCLR.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Internal.Runtime.InteropServices.WindowsRuntime; -using System.Runtime.InteropServices.WindowsRuntime; - -namespace System.IO -{ - internal partial class StreamOperationAsyncResult - { - private void ThrowWithIOExceptionDispatchInfo(Exception e) - { - WinRtIOHelper.NativeExceptionToIOExceptionInfo(ExceptionSupport.AttachRestrictedErrorInfo(_completedOperation.ErrorCode)).Throw(); - } - } -} diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.CoreRT.cs b/src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.CoreRT.cs deleted file mode 100644 index eaac3b6..0000000 --- a/src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.CoreRT.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Internal.Interop; -using System.Runtime.InteropServices.WindowsRuntime; - -namespace System.IO -{ - internal partial class StreamOperationAsyncResult - { - private void ThrowWithIOExceptionDispatchInfo(Exception e) - { - WinRtIOHelper.NativeExceptionToIOExceptionInfo(_completedOperation.ErrorCode.AttachRestrictedErrorInfo()).Throw(); - } - } -} diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.cs b/src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.cs index b903ec0..e5887ef 100644 --- a/src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.cs +++ b/src/libraries/System.Runtime.WindowsRuntime/src/System/IO/StreamOperationAsyncResult.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using Internal.Runtime.InteropServices.WindowsRuntime; using System.Diagnostics; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices.WindowsRuntime; @@ -281,6 +282,11 @@ namespace System.IO if (_userCompletionCallback != null) _userCompletionCallback(this); } + + private void ThrowWithIOExceptionDispatchInfo(Exception e) + { + WinRtIOHelper.NativeExceptionToIOExceptionInfo(ExceptionSupport.AttachRestrictedErrorInfo(_completedOperation.ErrorCode)).Throw(); + } } // class StreamOperationAsyncResult #endregion class StreamOperationAsyncResult diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System/InternalHelpers.CoreRT.cs b/src/libraries/System.Runtime.WindowsRuntime/src/System/InternalHelpers.CoreRT.cs deleted file mode 100644 index 2c67532..0000000 --- a/src/libraries/System.Runtime.WindowsRuntime/src/System/InternalHelpers.CoreRT.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Runtime.InteropServices; - -namespace System -{ - internal static class InternalHelpers - { - internal static void SetErrorCode(this Exception ex, int code) - { - InteropExtensions.SetExceptionErrorCode(ex, code); - } - } -} diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System/InternalHelpers.CoreCLR.cs b/src/libraries/System.Runtime.WindowsRuntime/src/System/InternalHelpers.cs similarity index 100% rename from src/libraries/System.Runtime.WindowsRuntime/src/System/InternalHelpers.CoreCLR.cs rename to src/libraries/System.Runtime.WindowsRuntime/src/System/InternalHelpers.cs diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System/Threading/Tasks/AsyncInfoToTaskBridge.CoreRT.cs b/src/libraries/System.Runtime.WindowsRuntime/src/System/Threading/Tasks/AsyncInfoToTaskBridge.CoreRT.cs deleted file mode 100644 index 60be7a5..0000000 --- a/src/libraries/System.Runtime.WindowsRuntime/src/System/Threading/Tasks/AsyncInfoToTaskBridge.CoreRT.cs +++ /dev/null @@ -1,244 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Internal.Interop; -using Internal.Threading.Tasks; -using System.Diagnostics; -using System.Runtime.InteropServices; -using Windows.Foundation; - -namespace System.Threading.Tasks -{ - /// Provides a bridge between IAsyncOperation* and Task. - /// Specifies the type of the result of the asynchronous operation. - internal sealed class AsyncInfoToTaskBridge : TaskCompletionSource - { - /// The CancellationToken associated with this operation. - private readonly CancellationToken _ct; - - /// A registration for cancellation that needs to be disposed of when the operation completes. - private CancellationTokenRegistration _ctr; - - /// A flag set to true as soon as the completion callback begins to execute. - private bool _completing; - - internal AsyncInfoToTaskBridge(CancellationToken cancellationToken) - { - if (AsyncCausalitySupport.LoggingOn) - AsyncCausalitySupport.TraceOperationCreation(this.Task, "WinRT Operation as Task"); - AsyncCausalitySupport.AddToActiveTasks(this.Task); - - _ct = cancellationToken; - } - - /// The synchronization object to use for protecting the state of this bridge. - private object StateLock - { - get { return this; } // "this" isn't available publicly, so we can safely use it as a syncobj - } - - /// Registers the async operation for cancellation. - /// The asynchronous operation. - internal void RegisterForCancellation(IAsyncInfo asyncInfo) - { - Debug.Assert(asyncInfo != null); - - try - { - if (_ct.CanBeCanceled && !_completing) - { // benign race on m_completing... it's ok if it's not up-to-date. - var ctr = _ct.Register(ai => ((IAsyncInfo)ai).Cancel(), asyncInfo); // delegate cached by compiler - - // The operation may already be completing by this time, in which case - // we might need to dispose of our new cancellation registration here. - bool disposeOfCtr = false; - lock (StateLock) - { - if (_completing) disposeOfCtr = true; - else _ctr = ctr; // under lock to avoid torn writes - } - - if (disposeOfCtr) - ctr.Unregister(); - } - } - catch (Exception ex) - { - // We do not want exceptions propagating out of the AsTask / GetAwaiter calls, as the - // Completed handler will instead store the exception into the returned Task. - // Such exceptions should cause the Completed handler to be invoked synchronously and thus the Task should already be completed. - - if (!base.Task.IsFaulted) - { - Debug.Fail($"Expected base task to already be faulted but found it in state {base.Task.Status}"); - base.TrySetException(ex); - } - } - } - - - /// Bridge to Completed handler on IAsyncAction. - internal void CompleteFromAsyncAction(IAsyncAction asyncInfo, AsyncStatus asyncStatus) - { - Complete(asyncInfo, null, asyncStatus); - } - - - /// Bridge to Completed handler on IAsyncActionWithProgress{TProgress}. - /// Specifies the type of progress notification data. - internal void CompleteFromAsyncActionWithProgress(IAsyncActionWithProgress asyncInfo, AsyncStatus asyncStatus) - { - Complete(asyncInfo, null, asyncStatus); - } - - - /// Bridge to Completed handler on IAsyncOperation{TResult}. - internal void CompleteFromAsyncOperation(IAsyncOperation asyncInfo, AsyncStatus asyncStatus) - { - Complete(asyncInfo, ai => ((IAsyncOperation)ai).GetResults(), asyncStatus); // delegate cached by compiler - } - - - /// Bridge to Completed handler on IAsyncOperationWithProgress{TResult,TProgress}. - /// Specifies the type of progress notification data. - internal void CompleteFromAsyncOperationWithProgress(IAsyncOperationWithProgress asyncInfo, AsyncStatus asyncStatus) - { - // delegate cached by compiler: - Complete(asyncInfo, ai => ((IAsyncOperationWithProgress)ai).GetResults(), asyncStatus); - } - - - /// Completes the task from the completed asynchronous operation. - /// The asynchronous operation. - /// A function used to retrieve the TResult from the async operation; may be null. - /// The status of the asynchronous operation. - private void Complete(IAsyncInfo asyncInfo, Func getResultsFunction, AsyncStatus asyncStatus) - { - if (asyncInfo == null) - throw new ArgumentNullException(nameof(asyncInfo)); - - AsyncCausalitySupport.RemoveFromActiveTasks(this.Task); - - try - { - Debug.Assert(asyncInfo.Status == asyncStatus, - "asyncInfo.Status does not match asyncStatus; are we dealing with a faulty IAsyncInfo implementation?"); - - // Assuming a correct underlying implementation, the task should not have been - // completed yet. If it is completed, we shouldn't try to do any further work - // with the operation or the task, as something is horked. - bool taskAlreadyCompleted = Task.IsCompleted; - - Debug.Assert(!taskAlreadyCompleted, "Expected the task to not yet be completed."); - - if (taskAlreadyCompleted) - throw new InvalidOperationException(SR.InvalidOperation_InvalidAsyncCompletion); - - // Clean up our registration with the cancellation token, noting that we're now in the process of cleaning up. - CancellationTokenRegistration ctr; - lock (StateLock) - { - _completing = true; - ctr = _ctr; // under lock to avoid torn reads - _ctr = default(CancellationTokenRegistration); - } - ctr.Unregister(); // It's ok if we end up unregistering a not-initialized registration; it'll just be a nop. - - try - { - // Find out how the async operation completed. It must be in a terminal state. - bool terminalState = asyncStatus == AsyncStatus.Completed - || asyncStatus == AsyncStatus.Canceled - || asyncStatus == AsyncStatus.Error; - - Debug.Assert(terminalState, "The async operation should be in a terminal state."); - - if (!terminalState) - throw new InvalidOperationException(SR.InvalidOperation_InvalidAsyncCompletion); - - // Retrieve the completion data from the IAsyncInfo. - TResult result = default(TResult); - Exception error = null; - if (asyncStatus == AsyncStatus.Error) - { - error = asyncInfo.ErrorCode; - - // Defend against a faulty IAsyncInfo implementation: - if (error == null) - { - Debug.Fail("IAsyncInfo.Status == Error, but ErrorCode returns a null Exception (implying S_OK)."); - error = new InvalidOperationException(SR.InvalidOperation_InvalidAsyncCompletion); - } - else - { - error = asyncInfo.ErrorCode.AttachRestrictedErrorInfo(); - } - } - else if (asyncStatus == AsyncStatus.Completed && getResultsFunction != null) - { - try - { - result = getResultsFunction(asyncInfo); - } - catch (Exception resultsEx) - { - // According to the WinRT team, this can happen in some egde cases, such as marshalling errors in GetResults. - error = resultsEx; - asyncStatus = AsyncStatus.Error; - } - } - - // Nothing to retrieve for a canceled operation or for a completed operation with no result. - - // Complete the task based on the previously retrieved results: - bool success = false; - switch (asyncStatus) - { - case AsyncStatus.Completed: - if (AsyncCausalitySupport.LoggingOn) - AsyncCausalitySupport.TraceOperationCompletedSuccess(this.Task); - success = base.TrySetResult(result); - break; - - case AsyncStatus.Error: - Debug.Assert(error != null, "The error should have been retrieved previously."); - success = base.TrySetException(error); - break; - - case AsyncStatus.Canceled: - success = base.TrySetCanceled(_ct.IsCancellationRequested ? _ct : new CancellationToken(true)); - break; - } - - Debug.Assert(success, "Expected the outcome to be successfully transfered to the task."); - } - catch (Exception exc) - { - // This really shouldn't happen, but could in a variety of misuse cases - // such as a faulty underlying IAsyncInfo implementation. - Debug.Fail($"Unexpected exception in Complete: {exc}"); - - if (AsyncCausalitySupport.LoggingOn) - AsyncCausalitySupport.TraceOperationCompletedError(this.Task); - - // For these cases, store the exception into the task so that it makes its way - // back to the caller. Only if something went horribly wrong and we can't store the exception - // do we allow it to be propagated out to the invoker of the Completed handler. - if (!base.TrySetException(exc)) - { - Debug.Fail("The task was already completed and thus the exception couldn't be stored."); - throw; - } - } - } - finally - { - // We may be called on an STA thread which we don't own, so make sure that the RCW is released right - // away. Otherwise, if we leave it up to the finalizer, the apartment may already be gone. - if (Marshal.IsComObject(asyncInfo)) - Marshal.ReleaseComObject(asyncInfo); - } - } // private void Complete(..) - } // class AsyncInfoToTaskBridge -} // namespace diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System/Threading/Tasks/AsyncInfoToTaskBridge.CoreCLR.cs b/src/libraries/System.Runtime.WindowsRuntime/src/System/Threading/Tasks/AsyncInfoToTaskBridge.cs similarity index 100% rename from src/libraries/System.Runtime.WindowsRuntime/src/System/Threading/Tasks/AsyncInfoToTaskBridge.CoreCLR.cs rename to src/libraries/System.Runtime.WindowsRuntime/src/System/Threading/Tasks/AsyncInfoToTaskBridge.cs diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System/WindowsRuntimeSystemExtensions.CoreRT.cs b/src/libraries/System.Runtime.WindowsRuntime/src/System/WindowsRuntimeSystemExtensions.CoreRT.cs deleted file mode 100644 index 2e920ca..0000000 --- a/src/libraries/System.Runtime.WindowsRuntime/src/System/WindowsRuntimeSystemExtensions.CoreRT.cs +++ /dev/null @@ -1,468 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using System.Threading; -using Windows.Foundation; - -using Internal.Interop; -using Internal.Threading.Tasks; - -namespace System -{ - /// Provides extension methods in the System namespace for working with the Windows Runtime.
- /// Currently contains:
- ///
    - ///
  • Extension methods for conversion between Windows.Foundation.IAsyncInfo and deriving generic interfaces - /// and System.Threading.Tasks.Task.
  • - ///
  • Extension methods for conversion between System.Threading.Tasks.Task - /// and Windows.Foundation.IAsyncInfo and deriving generic interfaces.
  • - ///
- [CLSCompliant(false)] - public static class WindowsRuntimeSystemExtensions - { - #region Converters from Windows.Foundation.IAsyncInfo (and interfaces that derive from it) to System.Threading.Tasks.Task - - #region Convenience Helpers - - private static void ConcatenateCancelTokens(CancellationToken source, CancellationTokenSource sink, Task concatenationLifetime) - { - Debug.Assert(sink != null); - - CancellationTokenRegistration ctReg = source.Register((state) => { ((CancellationTokenSource)state).Cancel(); }, - sink); - - concatenationLifetime.ContinueWith((_, state) => { ((CancellationTokenRegistration)state).Dispose(); }, - ctReg, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); - } - - - private static void ConcatenateProgress(IAsyncActionWithProgress source, IProgress sink) - { - // This is separated out into a separate method so that we only pay the costs of compiler-generated closure if progress is non-null. - source.Progress += new AsyncActionProgressHandler((_, info) => sink.Report(info)); - } - - - private static void ConcatenateProgress(IAsyncOperationWithProgress source, IProgress sink) - { - // This is separated out into a separate method so that we only pay the costs of compiler-generated closure if progress is non-null. - source.Progress += new AsyncOperationProgressHandler((_, info) => sink.Report(info)); - } - - #endregion Convenience Helpers - - - #region Converters from IAsyncAction to Task - - /// Gets an awaiter used to await this asynchronous operation. - /// An awaiter instance. - /// This method is intended for compiler user rather than use directly in code. - [EditorBrowsable(EditorBrowsableState.Never)] - public static TaskAwaiter GetAwaiter(this IAsyncAction source) - { - return AsTask(source).GetAwaiter(); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The Task representing the asynchronous operation. - public static Task AsTask(this IAsyncAction source) - { - return AsTask(source, CancellationToken.None); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The token used to request cancellation of the asynchronous operation. - /// The Task representing the asynchronous operation. - public static Task AsTask(this IAsyncAction source, CancellationToken cancellationToken) - { - if (source == null) - throw new ArgumentNullException(nameof(source)); - - // If source is actually a NetFx-to-WinRT adapter, unwrap it instead of creating a new Task: - var wrapper = source as TaskToAsyncActionAdapter; - if (wrapper != null && !wrapper.CompletedSynchronously) - { - Task innerTask = wrapper.Task; - Debug.Assert(innerTask != null); - Debug.Assert(innerTask.Status != TaskStatus.Created); - - if (!innerTask.IsCompleted) - { - // The race here is benign: If the task completes here, the concatination is useless, but not damaging. - if (cancellationToken.CanBeCanceled && wrapper.CancelTokenSource != null) - ConcatenateCancelTokens(cancellationToken, wrapper.CancelTokenSource, innerTask); - } - - return innerTask; - } - - // Fast path to return a completed Task if the operation has already completed: - switch (source.Status) - { - case AsyncStatus.Completed: - return Task.CompletedTask; - - case AsyncStatus.Error: - return Task.FromException(source.ErrorCode.AttachRestrictedErrorInfo()); - - case AsyncStatus.Canceled: - return Task.FromCanceled(cancellationToken.IsCancellationRequested ? cancellationToken : new CancellationToken(true)); - } - - // Benign race: source may complete here. Things still work, just not taking the fast path. - - // Source is not a NetFx-to-WinRT adapter, but a native future. Hook up the task: - var bridge = new AsyncInfoToTaskBridge(cancellationToken); - try - { - source.Completed = new AsyncActionCompletedHandler(bridge.CompleteFromAsyncAction); - bridge.RegisterForCancellation(source); - } - catch - { - AsyncCausalitySupport.RemoveFromActiveTasks(bridge.Task); - } - return bridge.Task; - } - - #endregion Converters from IAsyncAction to Task - - - #region Converters from IAsyncOperation to Task - - /// Gets an awaiter used to await this asynchronous operation. - /// An awaiter instance. - /// This method is intended for compiler user rather than use directly in code. - [EditorBrowsable(EditorBrowsableState.Never)] - public static TaskAwaiter GetAwaiter(this IAsyncOperation source) - { - return AsTask(source).GetAwaiter(); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The Task representing the asynchronous operation. - public static Task AsTask(this IAsyncOperation source) - { - return AsTask(source, CancellationToken.None); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The token used to request cancellation of the asynchronous operation. - /// The Task representing the asynchronous operation. - public static Task AsTask(this IAsyncOperation source, CancellationToken cancellationToken) - { - if (source == null) - throw new ArgumentNullException(nameof(source)); - - // If source is actually a NetFx-to-WinRT adapter, unwrap it instead of creating a new Task: - var wrapper = source as TaskToAsyncOperationAdapter; - if (wrapper != null && !wrapper.CompletedSynchronously) - { - Task innerTask = wrapper.Task as Task; - Debug.Assert(innerTask != null); - Debug.Assert(innerTask.Status != TaskStatus.Created); // Is WaitingForActivation a legal state at this moment? - - if (!innerTask.IsCompleted) - { - // The race here is benign: If the task completes here, the concatination is useless, but not damaging. - if (cancellationToken.CanBeCanceled && wrapper.CancelTokenSource != null) - ConcatenateCancelTokens(cancellationToken, wrapper.CancelTokenSource, innerTask); - } - - return innerTask; - } - - // Fast path to return a completed Task if the operation has already completed - switch (source.Status) - { - case AsyncStatus.Completed: - return Task.FromResult(source.GetResults()); - - case AsyncStatus.Error: - return Task.FromException(source.ErrorCode.AttachRestrictedErrorInfo()); - - case AsyncStatus.Canceled: - return Task.FromCanceled(cancellationToken.IsCancellationRequested ? cancellationToken : new CancellationToken(true)); - } - - // Benign race: source may complete here. Things still work, just not taking the fast path. - - // Source is not a NetFx-to-WinRT adapter, but a native future. Hook up the task: - var bridge = new AsyncInfoToTaskBridge(cancellationToken); - try - { - source.Completed = new AsyncOperationCompletedHandler(bridge.CompleteFromAsyncOperation); - bridge.RegisterForCancellation(source); - } - catch - { - AsyncCausalitySupport.RemoveFromActiveTasks(bridge.Task); - } - return bridge.Task; - } - - #endregion Converters from IAsyncOperation to Task - - - #region Converters from IAsyncActionWithProgress to Task - - /// Gets an awaiter used to await this asynchronous operation. - /// An awaiter instance. - /// This method is intended for compiler user rather than use directly in code. - [EditorBrowsable(EditorBrowsableState.Never)] - public static TaskAwaiter GetAwaiter(this IAsyncActionWithProgress source) - { - return AsTask(source).GetAwaiter(); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The Task representing the asynchronous operation. - public static Task AsTask(this IAsyncActionWithProgress source) - { - return AsTask(source, CancellationToken.None, null); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The token used to request cancellation of the asynchronous operation. - /// The Task representing the asynchronous operation. - public static Task AsTask(this IAsyncActionWithProgress source, CancellationToken cancellationToken) - { - return AsTask(source, cancellationToken, null); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The progress object used to receive progress updates. - /// The Task representing the asynchronous operation. - public static Task AsTask(this IAsyncActionWithProgress source, IProgress progress) - { - return AsTask(source, CancellationToken.None, progress); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The token used to request cancellation of the asynchronous operation. - /// The progress object used to receive progress updates. - /// The Task representing the asynchronous operation. - public static Task AsTask(this IAsyncActionWithProgress source, - CancellationToken cancellationToken, IProgress progress) - { - if (source == null) - throw new ArgumentNullException(nameof(source)); - - // If source is actually a NetFx-to-WinRT adapter, unwrap it instead of creating a new Task: - var wrapper = source as TaskToAsyncActionWithProgressAdapter; - if (wrapper != null && !wrapper.CompletedSynchronously) - { - Task innerTask = wrapper.Task; - Debug.Assert(innerTask != null); - Debug.Assert(innerTask.Status != TaskStatus.Created); // Is WaitingForActivation a legal state at this moment? - - if (!innerTask.IsCompleted) - { - // The race here is benign: If the task completes here, the concatinations are useless, but not damaging. - - if (cancellationToken.CanBeCanceled && wrapper.CancelTokenSource != null) - ConcatenateCancelTokens(cancellationToken, wrapper.CancelTokenSource, innerTask); - - if (progress != null) - ConcatenateProgress(source, progress); - } - - return innerTask; - } - - // Fast path to return a completed Task if the operation has already completed: - switch (source.Status) - { - case AsyncStatus.Completed: - return Task.CompletedTask; - - case AsyncStatus.Error: - return Task.FromException(source.ErrorCode.AttachRestrictedErrorInfo()); - - case AsyncStatus.Canceled: - return Task.FromCanceled(cancellationToken.IsCancellationRequested ? cancellationToken : new CancellationToken(true)); - } - - // Benign race: source may complete here. Things still work, just not taking the fast path. - - // Forward progress reports: - if (progress != null) - ConcatenateProgress(source, progress); - - // Source is not a NetFx-to-WinRT adapter, but a native future. Hook up the task: - var bridge = new AsyncInfoToTaskBridge(cancellationToken); - try - { - source.Completed = new AsyncActionWithProgressCompletedHandler(bridge.CompleteFromAsyncActionWithProgress); - bridge.RegisterForCancellation(source); - } - catch - { - AsyncCausalitySupport.RemoveFromActiveTasks(bridge.Task); - } - return bridge.Task; - } - - #endregion Converters from IAsyncActionWithProgress to Task - - - #region Converters from IAsyncOperationWithProgress to Task - - /// Gets an awaiter used to await this asynchronous operation. - /// An awaiter instance. - /// This method is intended for compiler user rather than use directly in code. - [EditorBrowsable(EditorBrowsableState.Never)] - public static TaskAwaiter GetAwaiter(this IAsyncOperationWithProgress source) - { - return AsTask(source).GetAwaiter(); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The Task representing the started asynchronous operation. - public static Task AsTask(this IAsyncOperationWithProgress source) - { - return AsTask(source, CancellationToken.None, null); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The token used to request cancellation of the asynchronous operation. - /// The Task representing the asynchronous operation. - public static Task AsTask(this IAsyncOperationWithProgress source, - CancellationToken cancellationToken) - { - return AsTask(source, cancellationToken, null); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The progress object used to receive progress updates. - /// The Task representing the asynchronous operation. - public static Task AsTask(this IAsyncOperationWithProgress source, - IProgress progress) - { - return AsTask(source, CancellationToken.None, progress); - } - - - /// Gets a Task to represent the asynchronous operation. - /// The asynchronous operation. - /// The token used to request cancellation of the asynchronous operation. - /// The progress object used to receive progress updates. - /// The Task representing the asynchronous operation. - public static Task AsTask(this IAsyncOperationWithProgress source, - CancellationToken cancellationToken, IProgress progress) - { - if (source == null) - throw new ArgumentNullException(nameof(source)); - - // If source is actually a NetFx-to-WinRT adapter, unwrap it instead of creating a new Task: - var wrapper = source as TaskToAsyncOperationWithProgressAdapter; - if (wrapper != null && !wrapper.CompletedSynchronously) - { - Task innerTask = wrapper.Task as Task; - Debug.Assert(innerTask != null); - Debug.Assert(innerTask.Status != TaskStatus.Created); // Is WaitingForActivation a legal state at this moment? - - if (!innerTask.IsCompleted) - { - // The race here is benign: If the task completes here, the concatinations are useless, but not damaging. - - if (cancellationToken.CanBeCanceled && wrapper.CancelTokenSource != null) - ConcatenateCancelTokens(cancellationToken, wrapper.CancelTokenSource, innerTask); - - if (progress != null) - ConcatenateProgress(source, progress); - } - - return innerTask; - } - - // Fast path to return a completed Task if the operation has already completed - switch (source.Status) - { - case AsyncStatus.Completed: - return Task.FromResult(source.GetResults()); - - case AsyncStatus.Error: - return Task.FromException(source.ErrorCode.AttachRestrictedErrorInfo()); - - case AsyncStatus.Canceled: - return Task.FromCanceled(cancellationToken.IsCancellationRequested ? cancellationToken : new CancellationToken(true)); - } - - // Benign race: source may complete here. Things still work, just not taking the fast path. - - // Forward progress reports: - if (progress != null) - ConcatenateProgress(source, progress); - - // Source is not a NetFx-to-WinRT adapter, but a native future. Hook up the task: - var bridge = new AsyncInfoToTaskBridge(cancellationToken); - try - { - source.Completed = new AsyncOperationWithProgressCompletedHandler(bridge.CompleteFromAsyncOperationWithProgress); - bridge.RegisterForCancellation(source); - } - catch - { - AsyncCausalitySupport.RemoveFromActiveTasks(bridge.Task); - } - return bridge.Task; - } - - #endregion Converters from IAsyncOperationWithProgress to Task - - #endregion Converters from Windows.Foundation.IAsyncInfo (and interfaces that derive from it) to System.Threading.Tasks.Task - - - #region Converters from System.Threading.Tasks.Task to Windows.Foundation.IAsyncInfo (and interfaces that derive from it) - - - public static IAsyncAction AsAsyncAction(this Task source) - { - if (source == null) - throw new ArgumentNullException(nameof(source)); - - return new TaskToAsyncActionAdapter(source, underlyingCancelTokenSource: null); - } - - - public static IAsyncOperation AsAsyncOperation(this Task source) - { - if (source == null) - throw new ArgumentNullException(nameof(source)); - - return new TaskToAsyncOperationAdapter(source, underlyingCancelTokenSource: null); - } - #endregion Converters from System.Threading.Tasks.Task to Windows.Foundation.IAsyncInfo (and interfaces that derive from it) - - } // class WindowsRuntimeSystemExtensions -} // namespace - -// WindowsRuntimeExtensions.cs diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System/WindowsRuntimeSystemExtensions.CoreCLR.cs b/src/libraries/System.Runtime.WindowsRuntime/src/System/WindowsRuntimeSystemExtensions.cs similarity index 100% rename from src/libraries/System.Runtime.WindowsRuntime/src/System/WindowsRuntimeSystemExtensions.CoreCLR.cs rename to src/libraries/System.Runtime.WindowsRuntime/src/System/WindowsRuntimeSystemExtensions.cs diff --git a/src/libraries/System.Runtime.WindowsRuntime/tests/System.Runtime.WindowsRuntime.Tests.csproj b/src/libraries/System.Runtime.WindowsRuntime/tests/System.Runtime.WindowsRuntime.Tests.csproj index 18429bb..b549610 100644 --- a/src/libraries/System.Runtime.WindowsRuntime/tests/System.Runtime.WindowsRuntime.Tests.csproj +++ b/src/libraries/System.Runtime.WindowsRuntime/tests/System.Runtime.WindowsRuntime.Tests.csproj @@ -21,7 +21,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Runtime/src/ApiCompatBaseline.uapaot.txt b/src/libraries/System.Runtime/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index e96111c..0000000 --- a/src/libraries/System.Runtime/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,18 +0,0 @@ -Compat issues with assembly System.Runtime: -TypesMustExist : Type 'System.ArgIterator' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.GC.GetTotalAllocatedBytes(System.Boolean)' does not exist in the implementation but it does exist in the contract. -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeNamedArgument' in the contract but not the implementation. -TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeNamedArgument' is marked as readonly in the contract so it must also be marked readonly in the implementation. -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeTypedArgument' in the contract but not the implementation. -TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeTypedArgument' is marked as readonly in the contract so it must also be marked readonly in the implementation. -MembersMustExist : Member 'System.String System.Runtime.CompilerServices.RuntimeFeature.DefaultImplementationsOfInterfaces' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.AllowNullAttribute' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.DisallowNullAttribute' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.MaybeNullAttribute' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.NotNullAttribute' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.NotNullWhenAttribute' does not exist in the implementation but it does exist in the contract. -Total Issues: 16 diff --git a/src/libraries/System.Runtime/src/System.Runtime.csproj b/src/libraries/System.Runtime/src/System.Runtime.csproj index f8b9365..8554e08 100644 --- a/src/libraries/System.Runtime/src/System.Runtime.csproj +++ b/src/libraries/System.Runtime/src/System.Runtime.csproj @@ -3,7 +3,6 @@ {56B9D0A9-44D3-488E-8B42-C14A6E30CAB2} System.Runtime true - true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release enable
diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj index c556e0e..fa81407 100644 --- a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj +++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj @@ -332,7 +332,4 @@
- - - \ No newline at end of file diff --git a/src/libraries/System.Runtime/tests/System/EnumTests.netcoreapp.cs b/src/libraries/System.Runtime/tests/System/EnumTests.netcoreapp.cs index 8828c47..fd0d81c 100644 --- a/src/libraries/System.Runtime/tests/System/EnumTests.netcoreapp.cs +++ b/src/libraries/System.Runtime/tests/System/EnumTests.netcoreapp.cs @@ -138,7 +138,6 @@ namespace System.Tests Assert.True(formatFExceptionName == nameof(InvalidOperationException) || formatFExceptionName == "ContractException"); } -#if netcoreapp // .NetNative does not support RefEmit nor any other way to create Enum types with unusual backing types. private static EnumBuilder GetNonRuntimeEnumTypeBuilder(Type underlyingType) { AssemblyBuilder assembly = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Name"), AssemblyBuilderAccess.Run); @@ -226,6 +225,5 @@ namespace System.Tests return enumBuilder.CreateTypeInfo().AsType(); } -#endif //netcoreapp } } diff --git a/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeFeatureTests.netcoreapp.cs b/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeFeatureTests.netcoreapp.cs index 1fac2d5..36f9f365 100644 --- a/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeFeatureTests.netcoreapp.cs +++ b/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeFeatureTests.netcoreapp.cs @@ -28,7 +28,7 @@ namespace System.Runtime.CompilerServices.Tests } } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNative))] + [Fact] public static void DynamicCode_Jit() { Assert.True(RuntimeFeature.IsDynamicCodeSupported); diff --git a/src/libraries/System.Security.AccessControl/tests/System.Security.AccessControl.Tests.csproj b/src/libraries/System.Security.AccessControl/tests/System.Security.AccessControl.Tests.csproj index b1957e3..f277021 100644 --- a/src/libraries/System.Security.AccessControl/tests/System.Security.AccessControl.Tests.csproj +++ b/src/libraries/System.Security.AccessControl/tests/System.Security.AccessControl.Tests.csproj @@ -69,7 +69,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj b/src/libraries/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj index 5b07d2e..e3673f2 100644 --- a/src/libraries/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj +++ b/src/libraries/System.Security.Cryptography.Algorithms/tests/System.Security.Cryptography.Algorithms.Tests.csproj @@ -275,7 +275,4 @@ - - - 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 5edec2e..0aef306 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 @@ -204,7 +204,4 @@ CommonTest\System\Security\Cryptography\AlgorithmImplementations\ECDiffieHellman\ECDiffieHellmanTests.Xml.cs - - - \ No newline at end of file diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj b/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj index bd215e8..cfb809c 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj +++ b/src/libraries/System.Security.Cryptography.Xml/src/System.Security.Cryptography.Xml.csproj @@ -111,7 +111,4 @@ - - - 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 aea1da1..617fb63 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 @@ -19,7 +19,4 @@ - - - \ No newline at end of file diff --git a/src/libraries/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj b/src/libraries/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj index 31e5916..565079d 100644 --- a/src/libraries/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj +++ b/src/libraries/System.Text.Encodings.Web/tests/System.Text.Encodings.Web.Tests.csproj @@ -48,6 +48,5 @@ UnicodeData.12.1.txt - \ No newline at end of file diff --git a/src/libraries/System.Text.RegularExpressions/tests/RegexCompilationHelper.cs b/src/libraries/System.Text.RegularExpressions/tests/RegexCompilationHelper.cs index 418d365..24018bc 100644 --- a/src/libraries/System.Text.RegularExpressions/tests/RegexCompilationHelper.cs +++ b/src/libraries/System.Text.RegularExpressions/tests/RegexCompilationHelper.cs @@ -17,7 +17,7 @@ namespace System.Text.RegularExpressions.Tests /// public static IEnumerable TransformRegexOptions(string testDataMethodName, int regexOptionsArrayIndex) { - // On Uap or NetNative the compiled feature isn't currently enabled, + // On UWP the compiled feature isn't currently enabled, // therefore we don't need the additional test data. if (PlatformDetection.IsUap) { 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 6ebeaec..9519a0e 100644 --- a/src/libraries/System.Threading.Overlapped/src/System.Threading.Overlapped.csproj +++ b/src/libraries/System.Threading.Overlapped/src/System.Threading.Overlapped.csproj @@ -4,7 +4,6 @@ {6A07CCB8-3E59-47e7-B3DD-DB1F6FC501D5} true true - true netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/System.Threading.Tasks.Dataflow.csproj b/src/libraries/System.Threading.Tasks.Dataflow/src/System.Threading.Tasks.Dataflow.csproj index d5b02e3..b87d996 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/System.Threading.Tasks.Dataflow.csproj +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/System.Threading.Tasks.Dataflow.csproj @@ -6,8 +6,6 @@ $(DefineConstants);USE_INTERNAL_CONCURRENT_COLLECTIONS $(DefineConstants);USE_INTERNAL_THREADING netstandard1.1;portable-net45+win8+wpa81 - - false netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;netstandard1.1-Debug;netstandard1.1-Release diff --git a/src/libraries/System.Threading.ThreadPool/src/ApiCompatBaseline.uapaot.txt b/src/libraries/System.Threading.ThreadPool/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index 2aae58b..0000000 --- a/src/libraries/System.Threading.ThreadPool/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,4 +0,0 @@ -Compat issues with assembly System.Threading.ThreadPool: -MembersMustExist : Member 'System.Threading.ThreadPool.CompletedWorkItemCount.get()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Threading.ThreadPool.PendingWorkItemCount.get()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Threading.ThreadPool.ThreadCount.get()' does not exist in the implementation but it does exist in the contract. diff --git a/src/libraries/System.Threading/src/ApiCompatBaseline.uapaot.txt b/src/libraries/System.Threading/src/ApiCompatBaseline.uapaot.txt deleted file mode 100644 index 8db229d..0000000 --- a/src/libraries/System.Threading/src/ApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,2 +0,0 @@ -Compat issues with assembly System.Threading: -MembersMustExist : Member 'System.Threading.Monitor.LockContentionCount.get()' does not exist in the implementation but it does exist in the contract. diff --git a/src/libraries/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj b/src/libraries/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj index 2241333..c142c74 100644 --- a/src/libraries/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj +++ b/src/libraries/System.Transactions.Local/tests/System.Transactions.Local.Tests.csproj @@ -18,7 +18,4 @@ - - - diff --git a/src/libraries/System.Xml.XDocument/ref/System.Xml.XDocument.Manual.cs b/src/libraries/System.Xml.XDocument/ref/System.Xml.XDocument.Manual.cs deleted file mode 100644 index 9c64ffd..0000000 --- a/src/libraries/System.Xml.XDocument/ref/System.Xml.XDocument.Manual.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// ------------------------------------------------------------------------------ -// Changes to this file must follow the http://aka.ms/api-review process. -// ------------------------------------------------------------------------------ - - -namespace System.Xml.Linq -{ - public partial class XElement - { - // Needed for serialization to correctly generate code to deserialize XElement on .NET Native - internal XElement() { } - } -} 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 b770aff..6b0b8a9 100644 --- a/src/libraries/System.Xml.XDocument/ref/System.Xml.XDocument.csproj +++ b/src/libraries/System.Xml.XDocument/ref/System.Xml.XDocument.csproj @@ -5,7 +5,6 @@ - diff --git a/src/libraries/System.Xml.XmlSerializer/src/MatchingRefApiCompatBaseline.uapaot.txt b/src/libraries/System.Xml.XmlSerializer/src/MatchingRefApiCompatBaseline.uapaot.txt deleted file mode 100644 index 8b340a7..0000000 --- a/src/libraries/System.Xml.XmlSerializer/src/MatchingRefApiCompatBaseline.uapaot.txt +++ /dev/null @@ -1,7 +0,0 @@ -Compat issues with assembly System.Xml.XmlSerializer: -# Used by uap tooling for serializer generation -MembersMustExist : Member 'System.String System.Xml.Serialization.XmlSerializer.DefaultNamespace' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.Xml.Serialization.XmlSerializer.Mode.get()' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.Xml.Serialization.XmlSerializer.Mode.set(System.Xml.Serialization.SerializationMode)' does not exist in the reference but it does exist in the implementation. -MembersMustExist : Member 'System.Xml.Serialization.XmlSerializer.SetXmlSerializerContract(System.Xml.Serialization.XmlSerializerImplementation)' does not exist in the reference but it does exist in the implementation. - diff --git a/src/libraries/pkg/descriptions.json b/src/libraries/pkg/descriptions.json index 3b9e3d8..da6b109 100644 --- a/src/libraries/pkg/descriptions.json +++ b/src/libraries/pkg/descriptions.json @@ -101,11 +101,6 @@ "CommonTypes": [] }, { - "Name": "Microsoft.NETCore.Runtime.Native", - "Description": "Support libraries for the .NET Core runtime used by .NETNative.", - "CommonTypes": [] - }, - { "Name": "Microsoft.NETCore.Targets", "Description": "Provides supporting infrastructure for portable projects: support identifiers that define framework and runtime for support targets and packages that reference the minimum supported package versions when targeting these.", "CommonTypes": [] diff --git a/src/libraries/shims/ApiCompatBaseline.uapaot.netstandard.txt b/src/libraries/shims/ApiCompatBaseline.uapaot.netstandard.txt deleted file mode 100644 index 285d6c3..0000000 --- a/src/libraries/shims/ApiCompatBaseline.uapaot.netstandard.txt +++ /dev/null @@ -1,150 +0,0 @@ -Compat issues with assembly mscorlib: -TypeCannotChangeClassification : Type 'System.RuntimeArgumentHandle' is a 'ref struct' in the implementation but is a 'struct' in the contract. -TypeCannotChangeClassification : Type 'System.TypedReference' is a 'ref struct' in the implementation but is a 'struct' in the contract. -TypeCannotChangeClassification : Type 'System.IO.FileAttributes' is a 'class' in the implementation but is a 'struct' in the contract. -MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle, System.RuntimeTypeHandle[])' does not exist in the implementation but it does exist in the contract. -Compat issues with assembly netstandard: -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.RuntimeArgumentHandle' is a 'ref struct' in the implementation but is a 'struct' in the contract. -TypeCannotChangeClassification : Type 'System.TypedReference' is a 'ref struct' in the implementation but is a 'struct' in the contract. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.ComponentModel.BackgroundWorker' in the contract but not the implementation. -CannotChangeAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' on 'System.Diagnostics.BooleanSwitch' changed from '[SwitchLevelAttribute(typeof(bool))]' in the contract to '[SwitchLevelAttribute(typeof(Boolean))]' in the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultPropertyAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation. -CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the implementation. -TypeCannotChangeClassification : Type 'System.IO.FileAttributes' is a 'class' in the implementation but is a 'struct' in the contract. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.IO.FileSystemWatcher' in the contract but not the implementation. -TypeCannotChangeClassification : Type 'System.IO.HandleInheritability' is a 'class' in the implementation but is a 'struct' in the contract. -MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle, System.RuntimeTypeHandle[])' does not exist in the implementation but it does exist in the contract. -Compat issues with assembly System: -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.ComponentModel.BackgroundWorker' in the contract but not the implementation. -CannotChangeAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' on 'System.Diagnostics.BooleanSwitch' changed from '[SwitchLevelAttribute(typeof(bool))]' in the contract to '[SwitchLevelAttribute(typeof(Boolean))]' in the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultPropertyAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation. -CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.IO.FileSystemWatcher' in the contract but not the implementation. -Compat issues with assembly System.ComponentModel.EventBasedAsync: -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.ComponentModel.BackgroundWorker' in the contract but not the implementation. -Compat issues with assembly System.Core: -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.IO.HandleInheritability' is a 'class' in the implementation but is a 'struct' in the contract. -Compat issues with assembly System.Diagnostics.Process: -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultPropertyAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation. -Compat issues with assembly System.Diagnostics.TraceSource: -CannotChangeAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' on 'System.Diagnostics.BooleanSwitch' changed from '[SwitchLevelAttribute(typeof(bool))]' in the contract to '[SwitchLevelAttribute(typeof(Boolean))]' in the implementation. -Compat issues with assembly System.DirectoryServices: -CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.DirectoryServices.DirectoryEntry' in the contract but not the implementation. -Compat issues with assembly System.IO.FileSystem.Primitives: -TypeCannotChangeClassification : Type 'System.IO.FileAttributes' is a 'class' in the implementation but is a 'struct' in the contract. -Compat issues with assembly System.IO.FileSystem.Watcher: -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.IO.FileSystemWatcher' in the contract but not the implementation. -Compat issues with assembly System.Management: -CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.Management.ManagementPath' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.Management.ManagementQuery' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.Management.ManagementScope' in the contract but not the implementation. -Compat issues with assembly System.Runtime: -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle, System.RuntimeTypeHandle[])' does not exist in the implementation but it does exist in the contract. -Compat issues with assembly System.Runtime.Handles: -TypeCannotChangeClassification : Type 'System.IO.HandleInheritability' is a 'class' in the implementation but is a 'struct' in the contract. -Compat issues with assembly System.Security.Cryptography.OpenSsl: -TypesMustExist : Type 'System.Security.Cryptography.DSAOpenSsl' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Security.Cryptography.ECDsaOpenSsl' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Security.Cryptography.RSAOpenSsl' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Security.Cryptography.SafeEvpPKeyHandle' does not exist in the implementation but it does exist in the contract. -Compat issues with assembly System.Security.Cryptography.Pkcs: -MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.Certificates.set(System.Security.Cryptography.X509Certificates.X509Certificate2Collection)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.SignedAttributes.set(System.Security.Cryptography.CryptographicAttributeObjectCollection)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.UnsignedAttributes.set(System.Security.Cryptography.CryptographicAttributeObjectCollection)' does not exist in the implementation but it does exist in the contract. -Compat issues with assembly System.ComponentModel.TypeConverter: -CannotSealType : Type 'System.ComponentModel.BaseNumberConverter' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.ComponentModel.BaseNumberConverter..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -Compat issues with assembly System.Xml.Schema: -CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety.get()' is non-virtual in the implementation but is virtual in the contract. -Compat issues with assembly System.Xml.ReaderWriter: -CannotSealType : Type 'System.Xml.Schema.XmlSchemaGroupBase' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Xml.Schema.XmlSchemaGroupBase..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items.get()' is non-virtual in the implementation but is virtual in the contract. -Compat issues with assembly System.Data.Constraint: -CannotSealType : Type 'System.Data.Constraint' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Data.Constraint..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.set(System.String)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ToString()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet.get()' is non-virtual in the implementation but is virtual in the contract. -CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. -CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. -Total Issues: 130 \ No newline at end of file diff --git a/src/libraries/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt b/src/libraries/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt deleted file mode 100644 index 2439bae..0000000 --- a/src/libraries/shims/ApiCompatBaseline.uapaot.netstandardOnly.txt +++ /dev/null @@ -1,131 +0,0 @@ -Compat issues with assembly netstandard: -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.ComponentModel.BackgroundWorker' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' exists on 'System.Diagnostics.BooleanSwitch' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultPropertyAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' exists on 'System.Diagnostics.TraceSwitch' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.IO.FileSystemWatcher' in the contract but not the implementation. -TypesMustExist : Type 'System.IO.Compression.BrotliDecoder' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.IO.Compression.BrotliEncoder' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.IO.Compression.BrotliStream' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Range.GetOffsetAndLength(System.Int32)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.AssemblyBuilder.SetEntryPoint(System.Reflection.MethodInfo)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.GetModule()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.GetToken()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.SetMethodBody(System.Byte[], System.Int32, System.Byte[], System.Collections.Generic.IEnumerable, System.Collections.Generic.IEnumerable)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.Signature.get()' does not exist in the implementation but it does exist in the contract. -CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.EnumBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the implementation but it does in the contract. -MembersMustExist : Member 'System.Reflection.Emit.EnumBuilder.CreateType()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.EnumBuilder.TypeToken.get()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.EventBuilder.GetEventToken()' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Reflection.Emit.EventToken' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Reflection.Emit.ExceptionHandler' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.FieldBuilder.GetToken()' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Reflection.Emit.FieldToken' does not exist in the implementation but it does exist in the contract. -CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.GenericTypeParameterBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the implementation but it does in the contract. -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.Emit.Label' in the contract but not the implementation. -CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.Label' does not implement interface 'System.IEquatable' in the implementation but it does in the contract. -TypeCannotChangeClassification : Type 'System.Reflection.Emit.Label' is marked as readonly in the contract so it must also be marked readonly in the implementation. -MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.CreateMethodBody(System.Byte[], System.Int32)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.GetModule()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.GetToken()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.SetMethodBody(System.Byte[], System.Int32, System.Byte[], System.Collections.Generic.IEnumerable, System.Collections.Generic.IEnumerable)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.Signature.get()' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Reflection.Emit.MethodToken' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetArrayMethodToken(System.Type, System.String, System.Reflection.CallingConventions, System.Type, System.Type[])' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetConstructorToken(System.Reflection.ConstructorInfo)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetConstructorToken(System.Reflection.ConstructorInfo, System.Collections.Generic.IEnumerable)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetFieldToken(System.Reflection.FieldInfo)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetMethodToken(System.Reflection.MethodInfo)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetMethodToken(System.Reflection.MethodInfo, System.Collections.Generic.IEnumerable)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetSignatureToken(System.Byte[], System.Int32)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetSignatureToken(System.Reflection.Emit.SignatureHelper)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetStringConstant(System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetTypeToken(System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetTypeToken(System.Type)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.IsTransient()' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.SetUserEntryPoint(System.Reflection.MethodInfo)' does not exist in the implementation but it does exist in the contract. -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.Emit.OpCode' in the contract but not the implementation. -CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.OpCode' does not implement interface 'System.IEquatable' in the implementation but it does in the contract. -TypeCannotChangeClassification : Type 'System.Reflection.Emit.OpCode' is marked as readonly in the contract so it must also be marked readonly in the implementation. -MembersMustExist : Member 'System.Reflection.Emit.ParameterBuilder.GetToken()' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Reflection.Emit.ParameterToken' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.PropertyBuilder.PropertyToken.get()' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Reflection.Emit.PropertyToken' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.SignatureHelper.GetMethodSigHelper(System.Reflection.Module, System.Runtime.InteropServices.CallingConvention, System.Type)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Reflection.Emit.SignatureHelper.GetMethodSigHelper(System.Runtime.InteropServices.CallingConvention, System.Type)' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Reflection.Emit.SignatureToken' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Reflection.Emit.StringToken' does not exist in the implementation but it does exist in the contract. -CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.TypeBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the implementation but it does in the contract. -MembersMustExist : Member 'System.Reflection.Emit.TypeBuilder.TypeToken.get()' does not exist in the implementation but it does exist in the contract. -TypesMustExist : Type 'System.Reflection.Emit.TypeToken' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle, System.RuntimeTypeHandle[])' does not exist in the implementation but it does exist in the contract. -CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Method, Inherited=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Method, Inherited=false, AllowMultiple=false)]' in the implementation. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GenerateGuidForType(System.Type)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GenerateProgIdForType(System.Type)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetComObjectData(System.Object, System.Object)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetHINSTANCE(System.Reflection.Module)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetIDispatchForObject(System.Object)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetTypedObjectForIUnknown(System.IntPtr, System.Type)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.SetComObjectData(System.Object, System.Object, System.Object)' does not exist in the implementation but it does exist in the contract. -CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlAnyAttributeAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation. -CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlNamespaceDeclarationsAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation. -CannotSealType : Type 'System.ComponentModel.BaseNumberConverter' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.ComponentModel.BaseNumberConverter..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety.get()' is non-virtual in the implementation but is virtual in the contract. -CannotSealType : Type 'System.Xml.Schema.XmlSchemaGroupBase' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Xml.Schema.XmlSchemaGroupBase..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items.get()' is non-virtual in the implementation but is virtual in the contract. -CannotSealType : Type 'System.Data.Constraint' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Data.Constraint..ctor()' does not exist in the implementation but it does exist in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.set(System.String)' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table.get()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ToString()' is non-virtual in the implementation but is virtual in the contract. -CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet.get()' is non-virtual in the implementation but is virtual in the contract. -CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract. -CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract. -MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract. - -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Action' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -TypeCannotChangeClassification : Type 'System.Func' is a 'class' in the implementation but is a 'delegate' in the contract. -CannotChangeAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' on 'System.Diagnostics.BooleanSwitch' changed from '[SwitchLevelAttribute(typeof(bool))]' in the contract to '[SwitchLevelAttribute(typeof(Boolean))]' in the implementation. -TypeCannotChangeClassification : Type 'System.IO.FileAttributes' is a 'class' in the implementation but is a 'struct' in the contract. -TypeCannotChangeClassification : Type 'System.IO.HandleInheritability' is a 'class' in the implementation but is a 'struct' in the contract. \ No newline at end of file -- 2.7.4