Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
How to make a copy/duplicate of a project with all its code? (Read 95 times)
bk13
Junior Member
**
Offline



Posts: 20
How to make a copy/duplicate of a project with all its code?
Sep 14th, 2020 at 10:59pm
 
Windows 10, latest updates installed. Visual Studio 2017.  Tool bar item vMicro, help, leads to the web pages with this:  Visual Micro - Release 20.09.10.1 - 11th September 2020 - VS 2017-2019, AS7

Summary:  What steps are needed to get VS to store a project on my D drive and to be able to return to it as a “previous” project or solution?

Details

Something I am doing prevents VS from saving and re-opening a project.   Here are the steps taken to create, then save, then attempt to reopen said project.
Start VS
File -> New -> Arduino Project
Enter a name:  “minimum”, click OK
Response: A folder with this name already exists.  Would you like to open the sketch if it exists.  Click OK, it opens the code that was started earlier.  The code does nothing but blink an LED.
Save the project as follows:
File -> Save minimum.io As….          Click it
Navigate to:  D:\visual_studio\projects and click Save
Do you want to replace: Yes
Close VS
VS prompts with: Save changes to the following items:  minimum.sln and minimum*
Click Yes
VS closes
Now try to resume, Launch VS
Click File -> Recent Projects and solutions
This solicits the display of one project:  ac_condensor_monitor.sln ( C:\Users/bryan/documents….)
I expect to find the most recent project, the one just saved named “minimum” 
So just to check:  Tools -> Options -> Projects and Solutions -> Locations
Look in field: Projects location to find: D:\visual_studio\projects
The next two fields: User project templates location:  and User item templates location:  were left at the initial values.
What must be done differently to save a solution/project in my selected directory: D:\visual_studio\projects
Back to top
« Last Edit: Sep 15th, 2020 at 3:57pm by Visual Micro »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10821
United Kingdom
Re: Save and reopen project.
Reply #1 - Sep 14th, 2020 at 11:13pm
 
Saving a single file is not saving a project and is not saving a solution. If you want to move or copy an entire project I suggest you use windows explorer. 

Remember that an Arduino project must be a folder containing an .ino of the same name.

myProject\myProject.ino

Therefore "File>Save As" doesn't really do what you need UNLESS you ensure you save myProject.ino into a new folder of same name. After that you would need to use "File>Open Arduino Project" one time so that you can open the .ino and have a project and solution created for you automatically. If you don't want to use "File>Open Arduino Project" then you can always add a new empty vc++ project to the same folder and then "Include" the .ino and source code into your new project. In that case the project you create should also have the same name as the master .ino and the folder.






Back to top
 
WWW  
IP Logged
 
bk13
Junior Member
**
Offline



Posts: 20
Re: Save and reopen project.
Reply #2 - Sep 15th, 2020 at 1:51am
 
Thanks for the reply.
Looking as carefully as possible, there is no method to to accomplish:
Quote:
Save Solution As ...

What is there, does not tell the user where to find the existing solution.  So to keep all projects off the C drive, the user must create a new project, hunt it down, then copy the directory over to the D drive (D for example)

This is a problem that I had hoped that moving to Visual Studio would correct.  I have used VS for many years and until now it did not require that source code be named the same as the enclosing directory.  That is not a real onerous requirement, but it is basically without merit.

And just to state the other problem explicitly:  There is no method to save a project where the user wants it saved.  The reason for this should be obvious.  Never keep your important data on the operating system drive.

End result:  VS is a better environment that Genuino, so far.  (Except that I cannot get it to work, but that's another thread here.)  But it does appear to propagate some of the problems / idiosyncrasies of Genuino.  I did, and continue to, expect better in this much more mature environment.

Again, thanks for your reply.
Back to top
« Last Edit: Sep 15th, 2020 at 1:52am by bk13 »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10821
United Kingdom
Re: How to make a copy/duplicate of a project with all its code?
Reply #3 - Sep 15th, 2020 at 3:58pm
 
Okay thanks, you are asking how to copy/duplicate an entire project. We will add a menu item into the next release that does same as Arduino IDE SaveAs.
Back to top
 
WWW  
IP Logged
 
arduino1
Junior Member
**
Offline



Posts: 31
Re: How to make a copy/duplicate of a project with all its code?
Reply #4 - Sep 17th, 2020 at 3:33pm
 
This is great. Very fast to publish new version: Datatypes in STM32 are recognized.
IDE "Save as" added. Congratulations! Thank you!
Worth to buy.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10821
United Kingdom
Re: How to make a copy/duplicate of a project with all its code?
Reply #5 - Sep 17th, 2020 at 7:19pm
 
Great yes we will look at it. There is a lame workaround, in visual micro if you right click the .ino file and select "Rename". Then visual micro will rename the folder and files/code as required. Therefore you can use that in various ways alonside windows explorer to copy/paste and rename projects.
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print