Copying and Renaming Visual Studio VB.NET Projects
It's actually easy, but at first it can appear confounding. Here (IMHO) is a good checklist, to make it easy and to make sure no step is missed.
Disclaimer: This list is for a VB.NET 2010 projects. My apologies, but I can't verify if the same list applies to C# or C++, or earlier versions of VB.NET.
1. Close all VS Projects and VS itself.
2. Via Windows Explorer make a copy of the (old) Project.
3. With reference to the new (copied) folder, and with the meaning "rename to the new Project name":
-> i. Rename the app (root) folder
-> ii. Rename the app (root)\(sub) folder
-> iii. Rename the .sln file
4. Delete the .suo file
5. Open the new app (rrot)\(sub) folder and "rename" the .vbproj file.
6. Open VS.
7. Click <Open Projects...> and point to the new .sln file
8. You will get the following error message:
-> "One or more projects in the solution were not loaded correctly.
-> Please see Output Window for details"
9. Click <OK> and ignore this message, for the remainder of this checklist.
10. When the Project opens, Right-Click on the Project in the Solutions Explorer, and select <Remove>
11. Again, Right-Click in the Solutions Explorer, and select <Add><Existing project...>
12. Point to, and open, the new .vbproj file in the (new) app (root)\(sub) folder.
13. Via the Solutions Explorer, check that all files are correctly named and in the correct folders. Starting with the Solution, click each item, going down the list, and inspect the Properties Window, looking for correct names and folders.
14. However, you are not done renaming the project.
15. In the Solutions Explorer, Double-Click <My project>
16. This opens the (new name) Top-Tab. The Left-Tab should be <Application>.
17. In the fields "Assembly name" and Root namespace", enter the new project name.
18. From the <File> menu, choose <Close Solution>, and click <OK> in reply to the question "Save changes to the following items:"
19. The new project should save and close, and should be visible now in VS under <Recent Projects>.
20. But you are still not done. There is some clean-up to do.
21. Open the new (renamed) app from the <Start page>.
22. Via the Solutions Explorer, right-click the Project (generally the first line below the Solution), and select <Remove>.
23. Assuming the old Project was able to compile, the new Project should also compile, and create the respective files.
24. Close the app and VS.
25. Go to the app folder (root)\(sub)\bin\debug and delete the files with the old project name.
26. Go to the app folder (root)\(sub)\obj\x86\debug and delete the files with the old project name.
27. Now you are done with copying, renaming, and cleaning up.
Download the attached file, and print it out for your checklist.
Good Luck
kdsdata


Reply With Quote


