Open adammarks opened 4 years ago
This looks like a bug to me.
@nguerrera, can you please take a look? Using a WPF window (System.Windows.Window) in a C++/CLI library is failing to build, even with <FrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" />
or <FrameworkReference Include="Microsoft.WindowsDesktop.App" />
.
To repro, use the NativeInteropApp-WPF-Multi solution from this repo and notice that building the CPP_CLI_Interop project fails with the error @adammarks pasted above.
This looks like the same issue as https://github.com/dotnet/sdk/issues/4204, which we'll be investigating now. cc @wli3
The fixed is checked in. Please reference https://github.com/dotnet/sdk/pull/4245 for workaround
Thanks @wli3 @mjrousos @nguerrera The workaround does fix this issue.
I'll leave this open so I can retest when 16.5 is ready
@adammarks, I just tried this scenario out again with the latest preview (16.6 preview 3) and confirmed the solution builds and runs successfully without the workaround.
This is the first time I'm trying to use something from WPF in a C++/CLI assembly and I get the following compile error
Repro Steps
Results:
Expected:
I have a Framework Reference to Microsoft.WindowsDesktop.App.WPF so that should be enough to get WindowsBase I think?