porting C++ CLR .NET framework Winform to .NET 8

cebuhax0r 66 Reputation points
2024-06-26T06:25:33.6966667+00:00

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. 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?

Is there any other way or is it the only way and I cant use my forms, dialogs and user control anymore?

Developer technologies .NET Other
0 comments No comments
{count} votes

Accepted answer
  1. Minxin Yu 13,501 Reputation points Microsoft External Staff
    2024-06-26T07:06:25.9766667+00:00

    Hi, @cebuhax0r

    Please refer to my answer from similar thread: .net8 windows form design view problem

    The out-of-process designer is not compatible with C++ CLR and .NET 6 or later , you need to add the control code manually.
    Also , you need to modify the dependencies as I mentioned in the link.

    Best regards,
    Minxin Yu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.