Link to home
Start Free TrialLog in
Avatar of Dominic34
Dominic34Flag for Canada

asked on

copy and paste controls between versions of visual studio ?

Hi,

We have an application build in VB.net 2003 and we are upgrading it to vb 2008. We can't use the upgrade wizard, anyway, the application is totally different in 2008. I just want to copy controls in then designer screen from visual studio 2003 to a windows form in vs 2008. Sounds stupid, but we can't figure out how to do it!! ctrl-c, ctrl-v don't works. neither copy-paste from the mouse or the Edit menu. Can we just copy controls from a visual studio version to another??

thanks
SOLUTION
Avatar of 13598
13598
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
A little more detail:
On the File menu, click Export Template.

Click Item Template, select the project that contains the item, and click Next.

Select the item for which you want to create a template, and click Next.

Select the assembly references to include in the template, and click Next.

Enter the icon file name, template name, and template description, and click Finish.

The files for the template are added to a .zip file and copied to the ..\Users\<username>\Documents\Visual Studio 2008\Templates\ItemTemplates\ folder.

Avatar of Dominic34

ASKER

In VS 2003, there is no "Export" option in the File menu.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can create it manually then:
The heart of the process of creating a template manually boils down to three basic steps. (After you design what you want your template to do. This is just the process of actually creating it.)

1.Assemble the files that are necessary for your template in one folder.
2.Code a .vstemplate XML file that describes the template.
3.Zip the files together (including the .vstemplate file) and copy the Zip file to the Visual Studio project template directory.

To manually create an item template
1.Create a project and project item.

2.Edit the project item until it is ready to be saved as a template.

3.As appropriate, edit the code file to indicate where parameter replacement should take place. For more information on parameter replacement, see How to: Substitute Parameters in a Template.

4.Create an XML file and save it with a .vstemplate extension in the same directory as your item.

5.Author the .vstemplate XML file to provide item template metadata. For more information, see the example in the following section.

6.Save and close the .vstemplate file.

7.Select the files included in your template, right-click, select Send To, and click Compressed (zipped) Folder. The files that you selected are compressed into a .zip file.

8.Place the .zip file in the user item template location. By default, the directory is \My Documents\Visual Studio 2005\Templates\ItemTemplates\. For more information, see How to: Locate and Organize Project and Item Templates.