You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generated code omits interop types because they are available via a metadata reference, references to those types are emitted assuming no extern alias applies. But in some more complex repos where multiple project references exist and types collide, the project may be using reference aliasing in order to disambiguate types in the various assemblies. In such a case, our generated code would need to prefix type references with the alias.
Expected behavior
Generated code should include an extern alias directive, and use that alias throughout the code whenever referencing the interop types from that assembly.
Where multiple metadata references include the same interop type, we'll have to pick one to use. This should probably come from the NativeMethods.json file.
Actual behavior
When generated code omits interop types because they are available via a metadata reference, references to those types are emitted assuming no
extern alias
applies. But in some more complex repos where multiple project references exist and types collide, the project may be using reference aliasing in order to disambiguate types in the various assemblies. In such a case, our generated code would need to prefix type references with the alias.Expected behavior
Generated code should include an
extern alias
directive, and use that alias throughout the code whenever referencing the interop types from that assembly.Where multiple metadata references include the same interop type, we'll have to pick one to use. This should probably come from the NativeMethods.json file.
Repro steps
See
CsWin32Sandbox_Repro.zip
for a repro.
Context
The text was updated successfully, but these errors were encountered: