Unable to copy-paste Winforms controls from a form in a vb.net project to a form in a c# project

for a big refactoring project of about 140 forms I've been trying to copy and paste these controls through the designer. I'm using VS 2022 but I've also tried with 2019. The origin project is in .NET4.5 and the new project is in dotnet6. My machine is running on win10.

These are the things I've tried so far:

  • keyboard shortcuts ( ctrl-a + ctrl-c / ctrl-x + ctrl-v )
  • Drag 'n drop ( ctrl-a + drag + drop )
  • Same methods as above but one control at a time ( total size of clip is 164k bytes )

enter image description here

The paste option in the context menu of the c# form is grayed out and when I drag 'n drop I'm shown a "blocking" icon.

I'm at a loss and not about to redesign all these forms.

Am I missing something here?


I just did some testing and it appears that you cannot drag and drop - or copy and paste, presumably - between different instances of VS, which you appear to be trying to do. I opened the same solution twice and I was able to drag and drop between C# and VB projects in the same instance but I wasn't able to do so between two forms in the same VB project between instances.

This means that you will have to add one of the projects to the solution containing the other. That's not a big deal because adding an existing project to a solution doesn't move or copy that project. The solution simply refers to it in its existing location. Once you've done all the drag and drop, you can simply remove the project from the solution again and you're done.