.NET Portability Report

Summary

Assembly.NET Framework 4.6ASP.NET 5 1.0
Orleans100%91.55%

Orleans

Target type.NET Framework 4.6ASP.NET 5 1.0Recommended changes
System.Management.ManagementObjectSearcher
#ctor(System.String)
Get
    
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
Serialize(System.IO.Stream,System.Object)
set_Binder(System.Runtime.Serialization.SerializationBinder)
Deserialize(System.IO.Stream)
#ctor
    
System.Type.GetTypeInfo().IsNestedFamily
get_IsNestedFamily.GetTypeInfo().IsNestedFamily
get_IsNotPublic.GetTypeInfo().IsNotPublic
GetConstructor(System.Reflection.BindingFlags,System.Reflection.Binder,System.Type[],System.Reflection.ParameterModifier[])Use GetConstructor(Type[]) to search for public constructors by parameter type or filter the results of GetConstructors(BindingFlags) using LINQ for other queries.
GetGenericParameterConstraints.GetTypeInfo().GetGenericParameterConstraints()
ReflectionOnlyGetType(System.String,System.Boolean,System.Boolean)
get_IsInterface.GetTypeInfo().IsInterface
get_IsEnum.GetTypeInfo().IsEnum
GetMethod(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Type[],System.Reflection.ParameterModifier[])Use GetMethod(string, Type[]) to search for public methods by name and parameter type or filter the results of GetMethods(BindingFlags) using LINQ for other queries.
GetInterfaceMap(System.Type)
get_IsNestedPrivate.GetTypeInfo().IsNestedPrivate
get_GenericParameterAttributes
get_BaseType.GetTypeInfo().BaseType
get_IsSerializable.GetTypeInfo().IsSerializable
get_IsNestedPublic.GetTypeInfo().IsNestedPublic
get_IsGenericTypeDefinition.GetTypeInfo().IsGenericTypeDefinition
get_IsGenericType.GetTypeInfo().IsGenericType
get_IsValueType.GetTypeInfo().IsValueType
get_IsClass.GetTypeInfo().IsClass
get_IsAbstract.GetTypeInfo().IsAbstract
get_IsPrimitive.GetTypeInfo().IsPrimitive
get_Assembly.GetTypeInfo().Assembly
GetTypeCode(System.Type)Use Type or RuntimeTypeHandle instead.
get_UnderlyingSystemType
get_ModuleUse System.Reflection.AssemblyExtensions.GetModules(), iterate over returned collection.
    
System.CodeDom.CodeTypeParameterCollection
Add(System.CodeDom.CodeTypeParameter)
#ctor
    
System.MarshalByRefObjectRemove usage: Remoting is no longer available
#ctorRemove usage
    
System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute
#ctor
    
System.Runtime.Serialization.SerializationInfoRemove serialization constructors on custom Exception types
GetValue(System.String,System.Type)either 1) Delete Serialization info from exceptions (since this can't be remoted) or 2) Use a different serialization technology if not for exceptions.
GetString(System.String)Remove serialization constructors on custom Exception types
GetBoolean(System.String)either 1) Delete Serialization info from exceptions (since this can't be remoted) or 2) Use a different serialization technology if not for exceptions.
AddValue(System.String,System.Object)Remove serialization constructors on custom Exception types
AddValue(System.String,System.Object,System.Type)either 1) Delete Serialization info from exceptions (since this can't be remoted) or 2) Use a different serialization technology if not for exceptions.
    
System.IO.TextWriterUse Dispose instead
CloseUse Dispose instead
    
System.Management.ManagementObjectCollection.ManagementObjectEnumerator
MoveNext
get_Current
    
System.Reflection.CustomAttributeData
GetCustomAttributes(System.Reflection.MemberInfo)
    
System.Reflection.Assembly
ReflectionOnlyLoadFrom(System.String)
ReflectionOnlyLoad(System.String)
GetCustomAttributes(System.Boolean)
GetTypesUse Assembly.DefinedTypes
get_LocationRemove usage
GetCallingAssembly
LoadFrom(System.String)Use AssemblyLoadContext
CreateInstance(System.String)Use System.Activator.CreateInstance(Assembly.GetType()) on type you are interested in.
GetExecutingAssemblytypeof(CurrentType).GetTypeInfo().Assembly
GetType(System.String,System.Boolean)Use Assembly.GetType(string), throw if you receive null return value.
get_ReflectionOnly
GetEntryAssembly
Load(System.String)use Assembly.Load(new AssemblyName(string))
    
System.Management.ManagementObjectCollection
GetEnumerator
    
System.Xml.XmlTextWriter
#ctor(System.IO.TextWriter)
    
System.ExceptionRemove. Getting rid of other usage of SerializationInfo will remove the need for this method.
GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)Remove. Getting rid of other usage of SerializationInfo will remove the need for this method.
GetTypeFalse positive (GetType() from Object is sufficient)
    
System.Threading.ThreadThis is only reliable in SQL Server. Elsewhere, don't use it.
ResetAbortThis is only reliable in SQL Server. Elsewhere, don't use it.
Abort(System.Object)This is only reliable in SQL Server. Elsewhere, don't use it.
    
System.CodeDom.CodeTypeParameter
get_Constraints
set_HasConstructorConstraint(System.Boolean)
#ctor(System.String)
    
System.EnvironmentDo not use. Choose action based feature availability, not OS / Platform
get_VersionDo not use. Choose action based feature availability, not OS / Platform
GetFolderPath(System.Environment.SpecialFolder,System.Environment.SpecialFolderOption)
get_OSVersionDo not use. Choose action based feature availability, not OS / Platform
get_UserName
    
System.Net.Dns
GetHostAddresses(System.String)
    
System.NonSerializedAttributeRemove usage
#ctorRemove usage
    
System.AppDomain
remove_ReflectionOnlyAssemblyResolve(System.ResolveEventHandler)
ApplyPolicy(System.String)
GetAssembliesRemove usage
add_DomainUnload(System.EventHandler)Use object with finalizer stored in static variable, or use app-model specific unload notifications (e.g. Application.Suspending event for modern apps)
add_AssemblyLoad(System.AssemblyLoadEventHandler)
add_AssemblyResolve(System.ResolveEventHandler)Remove usage
get_CurrentDomainRemove usage
ReflectionOnlyGetAssemblies
add_ReflectionOnlyAssemblyResolve(System.ResolveEventHandler)
    
System.Diagnostics.PerformanceCounter
get_RawValue
get_CounterName
#ctor(System.String,System.String,System.Boolean)
#ctor(System.String,System.String,System.String,System.Boolean)
NextValue
    
System.Security.Cryptography.SHA256CryptoServiceProvider
#ctor
    
System.SerializableAttributeRemove this attribute
#ctorRemove this attribute
    
System.Management.ManagementBaseObject
get_Properties
    
System.ResolveEventHandlerUse AssemblyLoadContext
#ctor(System.Object,System.IntPtr)Use AssemblyLoadContext
    
System.Diagnostics.PerformanceCounterCategory
GetInstanceNames
#ctor(System.String)
GetCounters(System.String)
    
System.Environment.SpecialFolder
    
System.IO.TextReaderUse Dispose instead
CloseUse Dispose instead
    
System.ResolveEventArgs
get_RequestingAssembly
get_NameUse AssemblyLoadContext
    
System.Runtime.Serialization.SerializationBinder
#ctor
    
System.Environment.SpecialFolderOption
    
System.UriTypeConverter
#ctor
    
System.OperatingSystemDo not use. Couple behavior to feature availability, not OS version or Platform.
    
System.ApplicationExceptionUse other exception types.
#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)Use other exception types.
#ctor(System.String)Use other exception types.
#ctor(System.String,System.Exception)Use other exception types.
    
System.Threading.ThreadPoolChange code to not depend on the size of the ThreadPool for functionality. Portable code needs to be able to run correctly on multiple different ThreadPool implementations, not all of which support this method.
GetMinThreads(System.Int32@,System.Int32@)Change code to not depend on the size of the ThreadPool for functionality. Portable code needs to be able to run correctly on multiple different ThreadPool implementations, not all of which support this method.
GetMaxThreads(System.Int32@,System.Int32@)Change code to not depend on the size of the ThreadPool for functionality. Portable code needs to be able to run correctly on multiple different ThreadPool implementations, not all of which support this method.
GetAvailableThreads(System.Int32@,System.Int32@)
    
System.Management.PropertyDataCollection
get_Item(System.String)
    
System.CodeDom.CodeTypeReference
#ctor(System.String)
    
System.Console
set_Title(System.String)
    
System.Diagnostics.CorrelationManager
set_ActivityId(System.Guid)
get_ActivityId
    
System.DelegateUse MethodInfo.CreateDelegate
CreateDelegate(System.Type,System.Reflection.MethodInfo)Use MethodInfo.CreateDelegate
get_MethodUse System.Reflection.RuntimeReflectionExtensions.GetMethodInfo
    
System.Xml.XmlNode
SelectNodes(System.String,System.Xml.XmlNamespaceManager)
    
System.Runtime.Remoting.Messaging.CallContext
LogicalSetData(System.String,System.Object)
FreeNamedDataSlot(System.String)
LogicalGetData(System.String)
    
System.CodeDom.CodeTypeReferenceCollection
Add(System.String)
Add(System.CodeDom.CodeTypeReference)
    
System.Runtime.Serialization.ISerializable
    
System.Reflection.ParameterModifierUse an overload that does not take a ParameterModifier array.
    
System.Diagnostics.StackTrace
#ctor(System.Boolean)
    
System.IO.StreamReaderUse File.OpenText, or use File.Open to get a Stream then pass it to StreamReader constructor
#ctor(System.String)Use File.OpenText, or use File.Open to get a Stream then pass it to StreamReader constructor
    
System.StringUse CultureInfo.TextInfo.ToLower(String) instead
ToLower(System.Globalization.CultureInfo)Use CultureInfo.TextInfo.ToLower(String) instead
    
System.AssemblyLoadEventArgs
get_LoadedAssembly
    
System.Activator
CreateInstance(System.Type,System.Boolean)
    
System.Diagnostics.Trace
get_CorrelationManager
    
System.AssemblyLoadEventHandler
#ctor(System.Object,System.IntPtr)
    
System.Diagnostics.ProcessUse System.Diagnostics.Process.SafeHandle
get_HandleUse System.Diagnostics.Process.SafeHandle
    
System.Reflection.AssemblyName
GetAssemblyName(System.String)
    
System.Reflection.BinderUse an overload that does not take a Binder.
    
System.Management.PropertyData
get_Value
    
System.Diagnostics.ConsoleTraceListeneruseErrorStream ? new TextWriterTraceListener(Console.Error) : new TextWriterTraceListener(Console.Out)
    
System.Runtime.Serialization.FormatterServices
GetUninitializedObject(System.Type)
    
System.Net.Sockets.SocketUse Dispose instead
CloseUse Dispose instead
    
System.Diagnostics.DebuggableAttribute
get_IsJITTrackingEnabled
    
System.Threading.ThreadAbortExceptionDo not use: exception cannot be caught since it is not thrown by framework, never throw this type. Thread.Abort is only reliable in SQL Server. Elsewhere, don't use it.
    
System.Management.ManagementObject
    
Back to summary