I Saved C# Project form as a new name, now project is broken. How to fix it?

Clay LaHatte 0 Reputation points
2024-03-05T02:56:24.25+00:00

I have a C# project in Visual Studio Community 2022 with a single form for the interface. I made some changes to the form and wanted to save it as a different name so I could preserve the previous design. Now I cannot see the form in the designer, but instead a windows with the message ...

"To prevent possible data loss before loading the designer, the following errors must be resolved: "

Can anyone explain how to resolve this?

UPDATE: I was able to get back to normal by renaming the filename extensions of the new .cs and .resx files. VS should be better than this.

Developer technologies | Windows Forms
Developer technologies | Visual Studio | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-03-05T09:46:50.06+00:00

    Hi @Clay LaHatte , Welcome to Microsoft Q&A,

    So the solution to this problem is:Renaming the filename extensions of the new .cs and .resx files.

    Best Regards,

    Jiale


    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.

    0 comments No comments

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.