From c158edadabd5f014ac342a291e8ac0512749cb06 Mon Sep 17 00:00:00 2001 From: danmosemsft Date: Sun, 22 Jan 2017 20:55:11 -0800 Subject: [PATCH] Remove FEATURE_WINDOWSPHONE Commit migrated from https://github.com/dotnet/coreclr/commit/6259c97b4f56218cd2154c0c1b17d565f4c2bd05 --- src/coreclr/clr.coreclr.props | 1 - src/coreclr/clr.defines.targets | 2 -- src/coreclr/src/mscorlib/model.xml | 4 +-- .../src/mscorlib/src/System.Private.CoreLib.txt | 7 +--- .../src/mscorlib/src/System/Reflection/Assembly.cs | 4 --- .../src/System/Resources/ResourceManager.cs | 41 +--------------------- 6 files changed, 4 insertions(+), 55 deletions(-) diff --git a/src/coreclr/clr.coreclr.props b/src/coreclr/clr.coreclr.props index 133d21e..ed5dd1a 100644 --- a/src/coreclr/clr.coreclr.props +++ b/src/coreclr/clr.coreclr.props @@ -49,7 +49,6 @@ true true - true true true true diff --git a/src/coreclr/clr.defines.targets b/src/coreclr/clr.defines.targets index 930d199..74b815f 100644 --- a/src/coreclr/clr.defines.targets +++ b/src/coreclr/clr.defines.targets @@ -94,7 +94,6 @@ $(CDefines);FEATURE_VERSIONING_LOG $(CDefines);FEATURE_WATSON $(CDefines);FEATURE_WIN32_REGISTRY - $(CDefines);FEATURE_WINDOWSPHONE $(CDefines);FEATURE_WINMD_RESILIENT $(CDefines);FEATURE_X509 $(CDefines);FEATURE_X509_SECURESTRINGS @@ -163,7 +162,6 @@ $(DefineConstants);FEATURE_USE_LCID $(DefineConstants);FEATURE_VALIDATOR $(DefineConstants);FEATURE_WIN32_REGISTRY - $(DefineConstants);FEATURE_WINDOWSPHONE $(DefineConstants);FEATURE_WINMD_RESILIENT $(DefineConstants);FEATURE_X509 $(DefineConstants);FEATURE_X509_SECURESTRINGS diff --git a/src/coreclr/src/mscorlib/model.xml b/src/coreclr/src/mscorlib/model.xml index 5244113..c68b411 100644 --- a/src/coreclr/src/mscorlib/model.xml +++ b/src/coreclr/src/mscorlib/model.xml @@ -4016,8 +4016,8 @@ - - + + diff --git a/src/coreclr/src/mscorlib/src/System.Private.CoreLib.txt b/src/coreclr/src/mscorlib/src/System.Private.CoreLib.txt index eea64a9..8026892 100644 --- a/src/coreclr/src/mscorlib/src/System.Private.CoreLib.txt +++ b/src/coreclr/src/mscorlib/src/System.Private.CoreLib.txt @@ -1408,10 +1408,9 @@ NotSupported_NativeCallableTarget = Methods with NativeCallableAttribute cannot NotSupported_GenericMethod = Generic methods with NativeCallableAttribute are not supported. NotSupported_NonBlittableTypes = Non-blittable parameter types are not supported for NativeCallable methods. -#if FEATURE_WINDOWSPHONE NotSupported_UserDllImport = DllImport cannot be used on user-defined methods. NotSupported_UserCOM = COM Interop is not supported for user-defined types. -#endif //FEATURE_WINDOWSPHONE + #if FEATURE_APPX NotSupported_AppX = {0} is not supported in AppX. LoadOfFxAssemblyNotSupported_AppX = {0} of .NET Framework assemblies is not supported in AppX. @@ -1424,12 +1423,8 @@ ReflectionTypeLoad_LoadFailed = Unable to load one or more of the requested type #if FEATURE_COMINTEROP NotSupported_PIAInAppxProcess = A Primary Interop Assembly is not supported in AppX. #endif -#if FEATURE_WINDOWSPHONE -; Not referring to "Windows Phone" in the messages, as FEATURE_WINDOWSPHONE is defined for .NET Core as well. -NotSupported_WindowsPhone = {0} is not supported. NotSupported_AssemblyLoadCodeBase = Assembly.Load with a Codebase is not supported. NotSupported_AssemblyLoadFromHash = Assembly.LoadFrom with hashValue is not supported. -#endif NotSupported_CannotCallEqualsOnSpan = Equals() on Span and ReadOnlySpan is not supported. Use operator== instead. NotSupported_CannotCallGetHashCodeOnSpan = GetHashCode() on Span and ReadOnlySpan is not supported. diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs index 1553e50..f8cb3b6 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs @@ -254,12 +254,10 @@ namespace System.Reflection Contract.Ensures(Contract.Result() != null); Contract.Ensures(!Contract.Result().ReflectionOnly); -#if FEATURE_WINDOWSPHONE if (assemblyRef != null && assemblyRef.CodeBase != null) { throw new NotSupportedException(Environment.GetResourceString("NotSupported_AssemblyLoadCodeBase")); } -#endif StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller; return RuntimeAssembly.InternalLoadAssemblyName(assemblyRef, null, null, ref stackMark, true /*thrownOnFileNotFound*/, false /*forIntrospection*/, false /*suppressSecurityChecks*/); @@ -273,12 +271,10 @@ namespace System.Reflection Contract.Ensures(Contract.Result() != null); Contract.Ensures(!Contract.Result().ReflectionOnly); -#if FEATURE_WINDOWSPHONE if (assemblyRef != null && assemblyRef.CodeBase != null) { throw new NotSupportedException(Environment.GetResourceString("NotSupported_AssemblyLoadCodeBase")); } -#endif StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller; return RuntimeAssembly.InternalLoadAssemblyName(assemblyRef, null, null, ref stackMark, true /*thrownOnFileNotFound*/, false /*forIntrospection*/, false /*suppressSecurityChecks*/, ptrLoadContextBinder); diff --git a/src/coreclr/src/mscorlib/src/System/Resources/ResourceManager.cs b/src/coreclr/src/mscorlib/src/System/Resources/ResourceManager.cs index 15f6af7..5c521e1 100644 --- a/src/coreclr/src/mscorlib/src/System/Resources/ResourceManager.cs +++ b/src/coreclr/src/mscorlib/src/System/Resources/ResourceManager.cs @@ -738,48 +738,9 @@ namespace System.Resources { } Contract.EndContractBlock(); -#if !FEATURE_WINDOWSPHONE - String v = null; - if (a.ReflectionOnly) { - foreach (CustomAttributeData data in CustomAttributeData.GetCustomAttributes(a)) { - if (data.Constructor.DeclaringType == typeof(SatelliteContractVersionAttribute)) { - v = (String)data.ConstructorArguments[0].Value; - break; - } - } - - if (v == null) - return null; - } - else { - Object[] attrs = a.GetCustomAttributes(typeof(SatelliteContractVersionAttribute), false); - if (attrs.Length == 0) - return null; - Debug.Assert(attrs.Length == 1, "Cannot have multiple instances of SatelliteContractVersionAttribute on an assembly!"); - v = ((SatelliteContractVersionAttribute)attrs[0]).Version; - } - Version ver; - try { - ver = new Version(v); - } - catch(ArgumentOutOfRangeException e) { - // Note we are prone to hitting infinite loops if mscorlib's - // SatelliteContractVersionAttribute contains bogus values. - // If this assert fires, please fix the build process for the - // BCL directory. - if (a == typeof(Object).Assembly) { - Debug.Assert(false, System.CoreLib.Name+"'s SatelliteContractVersionAttribute is a malformed version string!"); - return null; - } - - throw new ArgumentException(Environment.GetResourceString("Arg_InvalidSatelliteContract_Asm_Ver", a.ToString(), v), e); - } - return ver; -#else - // On the phone return null. The calling code will use the assembly version instead to avoid potential type + // Return null. The calling code will use the assembly version instead to avoid potential type // and library loads caused by CA lookup. NetCF uses the assembly version always. return null; -#endif } protected static CultureInfo GetNeutralResourcesLanguage(Assembly a) -- 2.7.4