VS 2022 Copy and Paste form feature Broken?

Phill 61 Reputation points
2022-05-18T22:09:48.67+00:00

Hi All,

When I copy and paste a form between folders in visual studio 2022, the class names in BOTH forms are updated when I rename the pasted form. I am not given the option to manually update the class name.

Is this a bug in VS 2022?

To fix the issue, I have to go back to my original form and the designer class and change the class name back to it's original name.

This seems like extremely basic functionality to be getting wrong in a program like VS2022. I just upgraded from VS 2013 and did not have this problem in the past. What am I missing, is this something I am doing wrong?

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,722 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Jiachen Li-MSFT 31,166 Reputation points Microsoft Vendor
    2022-05-19T05:38:44.797+00:00

    Hi @Phill ,
    203544-image.png
    Did you notice this prompt when renaming?
    If you choose Yes, it will modify Form1 to Form2 in your entire project, no matter which form they are in.
    Select No if you do not wish to do so. This way it will only modify the filename.
    Best Regards.
    Jiachen Li

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    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. arun kumar 0 Reputation points
    2024-10-02T02:26:11.8766667+00:00

    windos error

    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.