From 6259c97b4f56218cd2154c0c1b17d565f4c2bd05 Mon Sep 17 00:00:00 2001 From: danmosemsft Date: Sun, 22 Jan 2017 20:55:11 -0800 Subject: Remove FEATURE_WINDOWSPHONE --- clr.coreclr.props | 1 - clr.defines.targets | 2 -- 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/clr.coreclr.props b/clr.coreclr.props index 133d21ed0b..ed5dd1a2ec 100644 --- a/clr.coreclr.props +++ b/clr.coreclr.props @@ -49,7 +49,6 @@ true true - true true true true diff --git a/clr.defines.targets b/clr.defines.targets index 930d1994a9..74b815f8db 100644 --- a/clr.defines.targets +++ b/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/mscorlib/model.xml b/src/mscorlib/model.xml index 52441138f3..c68b4114a2 100644 --- a/src/mscorlib/model.xml +++ b/src/mscorlib/model.xml @@ -4016,8 +4016,8 @@ - - + + diff --git a/src/mscorlib/src/System.Private.CoreLib.txt b/src/mscorlib/src/System.Private.CoreLib.txt index eea64a9a29..8026892ae4 100644 --- a/src/mscorlib/src/System.Private.CoreLib.txt +++ b/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/mscorlib/src/System/Reflection/Assembly.cs b/src/mscorlib/src/System/Reflection/Assembly.cs index 1553e50ca5..f8cb3b648a 100644 --- a/src/mscorlib/src/System/Reflection/Assembly.cs +++ b/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/mscorlib/src/System/Resources/ResourceManager.cs b/src/mscorlib/src/System/Resources/ResourceManager.cs index 15f6af7bcf..5c521e1130 100644 --- a/src/mscorlib/src/System/Resources/ResourceManager.cs +++ b/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) -- cgit v1.2.3