locked
How to copy a Visual Basic project in Visual Studio 19 under a different name RRS feed

  • Question

  • Hi, I have a working project (it simulates a programmable sequence controller) - forms, controls all working fine.

    A new controller under development has Many more outputs, and other features and I need a simulator for it.

    How do I copy the existing project to a different folder and name?

    Once done, I could then add the forms, code and features of the new version.

    I don't see any kind of export function and "save as" appears to only copy the code (and maybe Designer) file.

    If only there was a "Save Project As..." facility.

    I appreciate whatever help can be rendered. Thanks, Kevin

    --------------------------------------------------------------------------------------------------

    Hmmm Rats, that sure seemed to work. I closed, opened, exited, reran, it all looked right.

    BUT, when I tried it a day later it blew all sorts of "path errors" that had the prior app name in the path string. I tried a Lot of ways to resolve it, but gave up after a few hours. I'll just have 2 versions in package folders of different names. The readme will explain to rename the launch shortcut if they want both versions.

    I will periodically request a "Save Project As" option. So Thanks, but I need to have these workable now. Kevin

    • Edited by Code_Geezer Saturday, May 30, 2020 6:00 PM Answer later failed
    Wednesday, May 27, 2020 4:04 PM

Answers

  • Two ideas

    Create a new project in the same Visual Studio solution. Now remove the default form. Next add existing items, traverse to them and add them into the new project.



    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Code_Geezer Wednesday, May 27, 2020 5:49 PM
    Wednesday, May 27, 2020 4:58 PM

All replies

  • Hi

    Here is what I do. It is likely not quite what you are asking for, but in my case works fine. I use this when I decide to make some changes to a working project and test out before commiting.I use File Explorer to Copy/Paste existing project folder - this will create a new folder (and contents) with ' - Copy" appended to the name. I then rename that to my own choice or, just work with as is until I decide whether or not to use/junk it.

    The original is untouched, the copy has any edits/additions etc and will compile and run just as the original (assuming I didn't mash it up in the edit).

    In some extremecases, I have had 3 or more 'versions' on the go until final version completed. I have never had an issue with this procedure.


    Regards Les, Livingston, Scotland

    Wednesday, May 27, 2020 4:35 PM
  • Two ideas

    Create a new project in the same Visual Studio solution. Now remove the default form. Next add existing items, traverse to them and add them into the new project.



    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by Code_Geezer Wednesday, May 27, 2020 5:49 PM
    Wednesday, May 27, 2020 4:58 PM
  • Hi, THANKS !!  I'd have never thought of That way.

    Took a "few minutes" to find Solution Explorer to delete the empty Form and Code files.

    But I stumbled through it and have what I need - Thanks Again, Kevin

    Wednesday, May 27, 2020 5:49 PM