How to move an existing user control, form or window from one project to a new project

0
0

I have already done a VS wisej project, call it VSProjectA. I have designed, created and coded existing forms, user controls and windows in VSProjectA. I want to reuse some of the existing user controls and forms from the VSProjectA and place them in a new VS WiseJ project, call it VSProjectB without recreating the entire form and user controls. I have tried to using “add/existing items”, to move forms and user controls from VSProjectA to VSPorjectB, but they do not come out right. The .cs, .Designer.cs and .resx files are not referenced together in solution explorer of VSProjectB from VSProejctA. Why is the happening? Is there another way to move created WiseJ forms, user controls and windows from VS Wisej project to another VS Wisej project, without recreating them from scratch?

thanks, gh

 

 

  • You must to post comments
0
0

Frank and Alaa,

I have checked the Namespaces and paths. They are the same. I have attached a pdf of what the usercontrol file looks like in solution explorer before being added as an existing file and after. Also, the pdf has images of how the UI in design mode looks before and after being added. Hope this makes sense.

thanks GH

  • Luca (ITG)
    The .Designer.cs file has to be dependent upon the main file. Usually when you copy paste the files together Visual Studio recognizes it. If it didn’t you have to fix the project by hand -> edit csproj and make the designer dependent, you can compare the msbuild definitions. Wisej has nothing to do with this.
  • You must to post comments
0
0

Hi Greg,

In addition to what Frank said, you’ll have to only add the .cs files, the other ones will be added automatically.
It’s mainly a VS thing not a Wisej issue.

And don’t forget to adjust the Namespaces !

HTH,
Alaa

  • You must to post comments
0
0

Hi Greg,

you might want to check out the Namespaces for your moved files. Maybe they don´t fit together or to the new Namespace?

Best regards
Frank

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.