I'm using Refasmer to generate reference assemblies for mixed assemblies (C++/CLI, .NET Framework 4.8) using the --public option. Building C# projects against these reference assemblies works great in general but fails when the C# project uses WPF. The build error typically reads as follows:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(268,9): error MC1000: Unknown build error, 'Could not load file or assembly 'MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Signature missing argument. (Exception from HRESULT: 0x801312E3)'
The error appears even for extremely simple mixed assemblies - e.g., assemblies containing just a single public type with no members. Apparently, mixed assemblies always contain an internal <Module> type in the global namespace. I've not yet seen the <Module> type in managed-only assemblies.
There is special handling for <Module> in the code. I've removed it for testing purposes so that <Module> is no longer included in the reference assemblies. These reference assemblies can then successfully be consumed in C# WPF projects. However, I do not yet know the meaning of the <Module> type, the impact of ignoring it, and why the special handling has been added.
I'm using Refasmer to generate reference assemblies for mixed assemblies (C++/CLI, .NET Framework 4.8) using the --public option. Building C# projects against these reference assemblies works great in general but fails when the C# project uses WPF. The build error typically reads as follows:
The error appears even for extremely simple mixed assemblies - e.g., assemblies containing just a single public type with no members. Apparently, mixed assemblies always contain an internal <Module> type in the global namespace. I've not yet seen the <Module> type in managed-only assemblies.
There is special handling for <Module> in the code. I've removed it for testing purposes so that <Module> is no longer included in the reference assemblies. These reference assemblies can then successfully be consumed in C# WPF projects. However, I do not yet know the meaning of the <Module> type, the impact of ignoring it, and why the special handling has been added.