Reputation: 107
There is a C++/CLI solution that contains C++/CLI and some WPF projects. They target .NET Framework 4.8. It's been working for years. We've tried to migrate it to the latest .NET 7, but have not succeeded. There are some examples of migration on the Internet, for example, a C++/CLI Windows Forms migration sample.
This sample is old and targets .NET Core 3.1, but we've managed to migrate it to .NET 7. We successfully ran it and experimented with it. The problem is that it is for Windows Forms. Nothing wrong with Windows Forms, but it crashes at runtime when we added a sample WPF project to this solution and tried to create an instance of a WPF window inside of C++/CLI. I tried to Google it, and everywhere there are samples of running Windows Forms on .NET Core within a C++/CLI execution context (or .NET 6+), not WPF. Is it possible at all to run WPF (consume a WPF project) in C++/CLI that targets .NET 7 (or .NET 6 at least)?
Upvotes: 0
Views: 368