Copying and Renaming Visual Studio VB.NET Projects-VBForums
Results 1 to 13 of 13

Thread: Copying and Renaming Visual Studio VB.NET Projects

  1. #1

    Thread Starter
    New Member kdsdata's Avatar
    Join Date
    Dec 2010
    Location
    Calgary, Canada
    Posts
    3

    Smile Copying and Renaming Visual Studio VB.NET Projects

    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.

    Revision 2:
    As suggested, I have revised this post based on comments submitted, and have moved the complete checklist into the attached PDF File.

    Thanks to submissions by
    (1) WCCRoberts correction for item 21.
    (2) OCD Dan regarding app root folder.
    (3) RosarioM regarding <Global.System.ComponentModel> and this link.
    (4) Bellhop regarding databases.

    Download the attached file, and print it out for your checklist.
    Good Luck
    kdsdata
    Attached Images Attached Images
    Last edited by kdsdata; Dec 12th, 2013 at 12:17 PM. Reason: comments submitted to this post

  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Copying and Renaming Visual Studio VB.NET Projects

    Hmm, what's so difficult? I just copied all the files from the solution folder to a new location and opened it there. All paths to the project files (except external references) are stored relative to the 'root' path of the project.
    And it's easier to rename the project when it's opened.

  3. #3
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: Copying and Renaming Visual Studio VB.NET Projects

    Moved To Tutorials
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  4. #4

    Thread Starter
    New Member kdsdata's Avatar
    Join Date
    Dec 2010
    Location
    Calgary, Canada
    Posts
    3

    Re: Copying and Renaming Visual Studio VB.NET Projects

    Hello cicatrix,

    You are correct in saying that you can copy the project folder and just rename the folder, and then rename the the project when the solution is open in VS.

    However, that does not clean up items such as the sub folder and the paths of any of your references to the "new" sub path. It also does not change the filenames for the "build" files.

    I am aware that my submitted checklist seems long, but it's actually not really that bad to go through, and "all" the references get changed to the new name. 2 minutes and you are done.

    I will add that the checklist is all predicated on having all the refrences AND files under the one (new) "project" root folder.

    If any files are "external" to the project root folder, then the checklist would be somewhat different. However, if the sub folder, and some of the files have the old project name (or parts of it), then you will need steps something like the checklist.

    Regards,
    kdsdata

  5. #5
    New Member
    Join Date
    Feb 2012
    Posts
    1

    Re: Copying and Renaming Visual Studio VB.NET Projects

    I have some confusion when I hit step 22. Deleting the new project that was just added doesn't make any sense to me. Are you supposed to add the project back at any point? Could you please clarify the last 6 steps?

  6. #6

    Thread Starter
    New Member kdsdata's Avatar
    Join Date
    Dec 2010
    Location
    Calgary, Canada
    Posts
    3

    Re: Copying and Renaming Visual Studio VB.NET Projects

    Thanks so much WCCRoberts for picking up on that.

    It is item 21 that has an error and should read:
    21. Via the Solutions Explorer, right-click the Project (generally the first line below the Solution), and select "Rebuild".

    Now items 22 to 26 make sence again.
    The corrected pdf file is attached.

    Thanks for the pointer,
    kdsdata

    Revision:
    Have removed the attachment (r1) from this comment. See attachment rev 2 in original post.
    Last edited by kdsdata; Dec 12th, 2013 at 12:14 PM.

  7. #7
    New Member
    Join Date
    Sep 2012
    Posts
    1

    Re: Copying and Renaming Visual Studio VB.NET Projects

    This was very useful. Thanks!!!

  8. #8
    New Member
    Join Date
    Oct 2012
    Posts
    1

    Re: Copying and Renaming Visual Studio VB.NET Projects

    kdsdata: I'm sure that your solution works, but not for me! I'm accessing numerous SQL Server Compact Edition databases using Datasets and Table Adapters. After I completed your steps and hit "Rebuild", I got gazillions of errors all relating to the Databases. The work has only just begun! I guess that we'll be sticking with the project "code name" for the time being. That's Sales: It takes them as long to come up with one product name as it takes Engineering to write and debug the entire system, then they complain about how much work it was!

    Take-away: If you're using Databases, you'll have more work to do.

  9. #9
    New Member
    Join Date
    Jun 2009
    Posts
    2

    Thumbs up Re: Copying and Renaming Visual Studio VB.NET Projects

    Thank you! I have been trying to figure out how to do this for a while now.

  10. #10
    Junior Member
    Join Date
    Nov 2010
    Posts
    30

    Re: Copying and Renaming Visual Studio VB.NET Projects

    I know this sounds dumb, but I'm trying to figure out which folders are app root and app sub folders, I'm gussing the root would be something like WindowsApplication1 but the sub folder, I'm really unsure of, any help would be great, thanks!

  11. #11
    New Member
    Join Date
    Jan 2013
    Posts
    1

    Re: Copying and Renaming Visual Studio VB.NET Projects

    If possible - I think you should EDIT the initial post on this thread ... folks MIGHT miss the corrected information if they don't scroll down the whole page.

    Just my 2 cents - thanks.

    Quote Originally Posted by kdsdata View Post
    Thanks so much WCCRoberts for picking up on that.

    It is item 21 that has an error and should read:
    21. Via the Solutions Explorer, right-click the Project (generally the first line below the Solution), and select "Rebuild".

    Now items 22 to 26 make sence again.
    The corrected pdf file is attached.

    Thanks for the pointer,
    kdsdata

  12. #12
    New Member
    Join Date
    Dec 2013
    Posts
    1

    Re: Copying and Renaming Visual Studio VB.NET Projects

    If you need to do this for a VSTO project the namespace field is disabled and officially MS says you can't rename the project. I was able to find this post that explains how to do it. The only additional change I had to make was in this section of code: <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
    Just change the old name to the new name. I was able to build and run the renamed solution.

  13. #13
    Lively Member
    Join Date
    Oct 2012
    Location
    Caracas, Venezuela
    Posts
    79

    Re: Copying and Renaming Visual Studio VB.NET Projects

    Hello kdsdata, I hope you are still on this thread.

    I have two little problems: a. I don not know which is that app sub folder. I have 4 sub folders: bin, my project, obj and resources. Which one is?
    B. What is that .suo file to delete?
    I opened the project to rename, I have gotten the error message, but the project did not open, therefore, I could not remove or add a thing.

    your help would be highly appreciated

    necalabria

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.