-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Description
Description
In .NET 10, RCWs for COM objects that implement IDispatchEx no longer support IReflect. This regression has broken hundreds of our tests.
Reproduction Steps
using System.Reflection;
var file = Activator.CreateInstance(Type.GetTypeFromProgID("htmlfile"));
Console.WriteLine("IReflect is " + (file is IReflect ? "supported" : "NOT supported"));Expected behavior
D:\Code\IReflectTest>dotnet run -f net9.0-windows
IReflect is supported
Actual behavior
D:\Code\IReflectTest>dotnet run -f net10.0-windows
IReflect is NOT supported
Regression?
Yes, as shown above, this is a regression. .NET 9 and earlier (and .NET Framework) work as expected.
Known Workarounds
Communicating with the object via IDispatch or IDispatchEx is possible but painful 😒
Configuration
No response
Other information
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status