0

we have a tool that was written in C++ CLR where its forms where also written as a Winform in C++ CLR, we plan to upgrade it to .NET 8 but it seems there is a pretty huge shift between .net framework and .NET 8 and/or future versions like 9.So I am assuming that the way to do this will be pretty tedious. so here are my questions

  1. in the unified .NET version (5 or higher), I assume the only way to create winforms is thru C# and there is no longer support for C++ CLR winforms?

  2. I read from somewhere (or even from the compile logs) that I need to build my C++ CLR to DLL to make it work and create a C# project that uses that DLL, I assume the winforms cannot be used now right?

  3. does that mean that I need to recareate the forms, dialogs and controls form my C++ CLR projects in C# and they cannot be reused?

I have tried changing the exe (Application) project from .Net framework v4.8 to .NET 7 and i got bunch of errors, and also a suggestion from logs that says build it as a DLL,

So I guess there is no other way but to redo it, Is there any other way or is it the only way and I cant use my forms, dialogs and user control anymore?

3
  • Support for creating Winforms apps in C++/CLI was removed 12 years ago. It didn't get better. Commented Jun 26, 2024 at 8:13
  • Can't see why it wouldn't work direct from C++/CLI, even if it's unsupported, you just need to add the relevant Nuget. You might have difficulty with the designers etc. Commented Jun 26, 2024 at 9:45
  • learn.microsoft.com/dotnet/core/porting/cpp-cli Have been there for a few years now. If you read something different from elsewhere, verify if enough evidence is presented. Commented Jun 26, 2024 at 14:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.