Why my Visual Studio 2022 Crashes when added new Windows Form UI in CLR Project?

Gyumin Kang 25 Reputation points
2024-10-24T07:15:20.41+00:00

Following This Tutorial Video, I'm keep Experiencing fatal crash at Adding new WinForm UI item. (at 3:10~ in video) followed Exactly the video's tutorial.(the video gets an Error too, but It's not fatal as I crash.)

I Made new CLI Empty Project(.NET Framework) in Visual Studio 2022. Then in Project Properties, I changed Platform to Win32, Configuration Properties -> Linker -> System -> SubSystem to WINDOWS, Linker -> Advanced -> Entry Point to main, and Added new Item -> UI -> Windows Form.

the only difference i noticed are hardware and Visual Studio 2022. it crashes after being pale

New WinForm.h Should generate Without Crash in my Source Files folder as well in the Video Tutorial

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,904 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,221 questions
{count} vote

Accepted answer
  1. Anna Xiu-MSFT 29,926 Reputation points Microsoft Vendor
    2024-10-24T09:21:58.4466667+00:00

    Hi @Gyumin Kang

    Welcome to Microsoft Q&A! 

    I couldn’t reproduce your issue in Visual Studio Professional 2022 version 17.11.5. But I found the similar issue:

    Adding resource for C++ application crashes Visual Studio - Developer Community 

    It may be a Windows issue. You can refer to Quin Tosch’s suggestion to manually create the following key and value:

    Path: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Main

    Name: JScriptReplacement

    Type: REG_DWORD

    Value:

    Then, reboot the computer and add the Windows Forms UI again. 

    Sincerely,

    Anna


    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.

     

    2 people 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.