RuntimeEnvironment.GetRuntimeInterfaceAsObject is not supported
See original GitHub issueRunning the Microsoft.DotNet.Analyzers.Compatibility, I found one occurence of API that is not supported on .NET Core.
In ComponentManagerBroker we call RuntimeEnvironment.GetRuntimeInterfaceAsObject. This method throws a PlatformNotSupportedException.
I wasn’t actually capable of writing a repro. This code is hit only in the case where there is a “native component manager” . Since we’re trying to retrieve a IMsoComponentManager, I’m guessing this is specific to hosting scenarios in Microsoft Office.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
RuntimeEnvironment.GetRuntimeInterfaceAsObject is not ...
Running the Microsoft.DotNet.Analyzers.Compatibility, I found one occurence of API that is not supported on .NET Core. In ComponentManagerBroker ...
Read more >RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid, ...
Returns an instance of a type that represents a COM object by a pointer to its IUnknown interface.
Read more >MSB3322 on signing assembly on Visual Studio for Mac ...
I just recompiled some old signing-based Xamarin.Android apps w/ the latest Xamarin versions using msbuild/csc and .pfx just do not work (unless ...
Read more >Load Assembly error when using ADO .NET datasets and ...
Connecting to an ADO .NET Dataset results in the error: Could not load file or assembly 'file:///C:\Program Files\SAP BusinessObjects\SAP ...
Read more >RuntimeEnvironment.cs source code in C# .NET
On Silverlight, this type exists but is // not public. [Obsolete("Do not create instances of the RuntimeEnvironment class. Call the static methods directly ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Fair point… We will reopen for now. I’ll find an office contact to help us test this scenario.
Since Office is not interested into coordinating usage of ComponentManager API (see #1763) I opened #3536 for discussion of alternatives. I prefer removal or disabling of ComponentManager integration since WPF seems to do fine without it. Not starting the discussion here because this issue can be fixed independently before discussion in #3536 yields results, but if consensus is achieved first then of course both issues can be resolved together.