Bring System.Runtime.InteropServices up to .NET Standard 2.0
Below are the list of types that are either missing, changed (eg changed derivation), or have missing members vs .NET Standard 2.0
T:System.Runtime.InteropServices.AssemblyRegistrationFlags
T:System.Runtime.InteropServices.AutomationProxyAttribute
T:System.Runtime.InteropServices.ComAliasNameAttribute
T:System.Runtime.InteropServices.ComCompatibleVersionAttribute
T:System.Runtime.InteropServices.ComConversionLossAttribute
T:System.Runtime.InteropServices.ComRegisterFunctionAttribute
T:System.Runtime.InteropServices.ComUnregisterFunctionAttribute
T:System.Runtime.InteropServices.ExporterEventKind
T:System.Runtime.InteropServices.ExtensibleClassFactory
T:System.Runtime.InteropServices.HandleRef
T:System.Runtime.InteropServices.ICustomFactory
T:System.Runtime.InteropServices.ICustomMarshaler
T:System.Runtime.InteropServices.IDispatchImplAttribute
T:System.Runtime.InteropServices.IDispatchImplType
T:System.Runtime.InteropServices.LCIDConversionAttribute
T:System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute
T:System.Runtime.InteropServices.Marshal
T:System.Runtime.InteropServices.ObjectCreationDelegate
T:System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute
T:System.Runtime.InteropServices.ProgIdAttribute
T:System.Runtime.InteropServices.RegistrationClassContext
T:System.Runtime.InteropServices.RegistrationConnectionType
T:System.Runtime.InteropServices.SafeHandle
T:System.Runtime.InteropServices.SetWin32ContextInIDispatchAttribute
T:System.Runtime.InteropServices.TYPEKIND
T:System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute
T:System.Runtime.InteropServices.UnmanagedType
T:System.Runtime.InteropServices.Expando.IExpando
T:System.Runtime.InteropServices.WindowsRuntime.DesignerNamespaceResolveEventArgs
T:System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken
T:System.Runtime.InteropServices.WindowsRuntime.NamespaceResolveEventArgs
T:System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMetadata
E:System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMetadata.DesignerNamespaceResolve
E:System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMetadata.ReflectionOnlyNamespaceResolve
a few members of this namespace (such as T:System.Runtime.InteropServices.RuntimeEnvironment) are already covered by https://github.com/dotnet/corefx/issues/11808. Check with @ramarag to make sure everything is covered between you
@ramarag Do any of these above require runtime changes? If so, we should make sure they are on your plate and leave Alex the ones that are framework changes. cc @weshaggard
I did a quick scan through the above list of these only the following seem to need runtime interaction. I can take them into my list
T:System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMetadata
E:System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMetadata.DesignerNamespaceResolve
E:System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMetadata.ReflectionOnlyNamespaceResolve
Please make sure to compare this list against what is currently in netstandard as we have done some clean-up recently https://github.com/dotnet/standard/pull/44.
@ramarag The following methods also need runtime interaction.
M:System.Runtime.InteropServices.Marshal.BindToMoniker
M:System.Runtime.InteropServices.Marshal.ChangeWrapperHandleStrength
https://github.com/dotnet/corefx/pull/13479
public abstract class CriticalHandle : CriticalFinalizerObject, IDisposable {
public void Close();
}
is not listed above.
These types are in the above list but not is the updated net standard(https://raw.githubusercontent.com/dotnet/standard/master/netstandard/ref/mscorlib.cs):
ExtensibleClassFactory IDispatchImplAttribute IDispatchImplType ObjectCreationDelegate SetWin32ContextInIDispatchAttribute IExpando DesignerNamespaceResolveEventArgs EventRegistrationToken NamespaceResolveEventArgs WindowsRuntimeMetadata DesignerNamespaceResolve ReflectionOnlyNamespaceResolve
Do we need these?
As discussed, we don't need anything that's not in https://raw.githubusercontent.com/dotnet/standard/master/netstandard/ref
What package do we need to reference inside a netstandard 2.0 project to have System.Runtime.InteropServices namespace classes recognized? Because by default TypeLibTypeAttribute is not recognized and System.Runtime.InteropServices namespace is not found. Need to reference System.Runtime.InteropServices package? That package dependencies don't state that it supports nestandard 2, see: https://www.nuget.org/packages/System.Runtime.InteropServices/