Remove FEATURE_WINDOWSPHONE
authordanmosemsft <danmose@microsoft.com>
Mon, 23 Jan 2017 04:55:11 +0000 (20:55 -0800)
committerdanmosemsft <danmose@microsoft.com>
Mon, 23 Jan 2017 05:51:02 +0000 (21:51 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/6259c97b4f56218cd2154c0c1b17d565f4c2bd05

src/coreclr/clr.coreclr.props
src/coreclr/clr.defines.targets
src/coreclr/src/mscorlib/model.xml
src/coreclr/src/mscorlib/src/System.Private.CoreLib.txt
src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs
src/coreclr/src/mscorlib/src/System/Resources/ResourceManager.cs

index 133d21e..ed5dd1a 100644 (file)
@@ -49,7 +49,6 @@
     <FeatureRandomizedStringHashing>true</FeatureRandomizedStringHashing>
     <!-- The rejit feature is available only on supported architectures (x86 & x64) -->
     <FeatureReJIT Condition="('$(TargetArch)' == 'i386') or ('$(TargetArch)' == 'amd64')">true</FeatureReJIT>
-    <FeatureWindowsPhone>true</FeatureWindowsPhone>
     <FeatureManagedEtw>true</FeatureManagedEtw>
     <BinderDebugLog Condition="'$(_BuildType)'=='dbg'">true</BinderDebugLog>
     <FeatureAppX>true</FeatureAppX>
index 930d199..74b815f 100644 (file)
@@ -94,7 +94,6 @@
         <CDefines Condition="'$(FeatureVersioningLog)' == 'true'">$(CDefines);FEATURE_VERSIONING_LOG</CDefines>
         <CDefines Condition="'$(FeatureWatson)' == 'true'">$(CDefines);FEATURE_WATSON</CDefines>
         <CDefines Condition="'$(FeatureWin32Registry)' == 'true'">$(CDefines);FEATURE_WIN32_REGISTRY</CDefines>
-        <CDefines Condition="'$(FeatureWindowsPhone)' == 'true'">$(CDefines);FEATURE_WINDOWSPHONE</CDefines>
         <CDefines Condition="'$(FeatureWinMDResilient)' == 'true'">$(CDefines);FEATURE_WINMD_RESILIENT</CDefines>
         <CDefines Condition="'$(FeatureX509)' == 'true'">$(CDefines);FEATURE_X509</CDefines>
         <CDefines Condition="'$(FeatureX509Securestrings)' == 'true'">$(CDefines);FEATURE_X509_SECURESTRINGS</CDefines>
         <DefineConstants Condition="'$(FeatureUseLcid)' == 'true'">$(DefineConstants);FEATURE_USE_LCID</DefineConstants>
         <DefineConstants Condition="'$(FeatureValidator)' == 'true'">$(DefineConstants);FEATURE_VALIDATOR</DefineConstants>
         <DefineConstants Condition="'$(FeatureWin32Registry)' == 'true'">$(DefineConstants);FEATURE_WIN32_REGISTRY</DefineConstants>
-        <DefineConstants Condition="'$(FeatureWindowsPhone)' == 'true'">$(DefineConstants);FEATURE_WINDOWSPHONE</DefineConstants>
         <DefineConstants Condition="'$(FeatureWinMDResilient)' == 'true'">$(DefineConstants);FEATURE_WINMD_RESILIENT</DefineConstants>
         <DefineConstants Condition="'$(FeatureX509)' == 'true'">$(DefineConstants);FEATURE_X509</DefineConstants>
         <DefineConstants Condition="'$(FeatureX509Securestrings)' == 'true'">$(DefineConstants);FEATURE_X509_SECURESTRINGS</DefineConstants>
index 5244113..c68b411 100644 (file)
       <Member Status="ImplRoot" MemberType="Field" Name="m_assembly" />
       <Member Status="ImplRoot" Name="OnModuleResolveEvent(System.String)" /> <!-- EE -->
       <Member Status="ImplRoot" MemberType="Property" Name="DefinedTypes" />
-      <!-- On Windows Phone Assembly.LoadFrom throws a NotSupportedException.  Prevent this internal helper from being stripped by the rewriter so that tests may reflect and call it since they need LoadFrom functionality -->
-      <Member Status="ImplRoot" Name="InternalLoadFrom(System.String,System.Security.Policy.Evidence,System.Byte[],System.Configuration.Assemblies.AssemblyHashAlgorithm,System.Boolean,System.Boolean,System.Threading.StackCrawlMark@)" Condition="FEATURE_WINDOWSPHONE" />
+      <!-- Assembly.LoadFrom throws a NotSupportedException.  Prevent this internal helper from being stripped by the rewriter so that tests may reflect and call it since they need LoadFrom functionality -->
+      <Member Status="ImplRoot" Name="InternalLoadFrom(System.String,System.Security.Policy.Evidence,System.Byte[],System.Configuration.Assemblies.AssemblyHashAlgorithm,System.Boolean,System.Boolean,System.Threading.StackCrawlMark@)" />
     </Type>
     <Type Name="System.Reflection.TypeInfo">
       <Member Name="#ctor" />
index eea64a9..8026892 100644 (file)
@@ -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.
 
index 1553e50..f8cb3b6 100644 (file)
@@ -254,12 +254,10 @@ namespace System.Reflection
             Contract.Ensures(Contract.Result<Assembly>() != null);
             Contract.Ensures(!Contract.Result<Assembly>().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<Assembly>() != null);
             Contract.Ensures(!Contract.Result<Assembly>().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);
index 15f6af7..5c521e1 100644 (file)
@@ -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)