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....
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
Using visual micro with Visual studio and github (Read 104 times)
Ade
Newbies
*
Offline



Posts: 2
Using visual micro with Visual studio and github
Oct 15th, 2019 at 5:56pm
 
Sorry for a complete noob question, but what is the best process for using github for version control/storage and sharing of the code between two computers (my desktop and my laptop).  It seems that either you can't or just that I don't know how to force all libs/board packages into the project directory. I can get the project to compile on one machine, but it fails with dependency errors on the second (laptop).


Thanks

Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Online



Posts: 10566
United Kingdom
Re: Using visual micro with Visual studio and github
Reply #1 - Oct 19th, 2019 at 3:51pm
 
Hi,

You have two options.

#1
The 1st is the way you are working which means to ensure you have installed the same Arduino libraries on both machines.

or complete source control ...

#2

If you look at the "Add Library" menu in Visual Micro you will see an option that says "Clone to Solution". Using that option then selecting any libraries you want to use will automatically create a local COPY of a library alongside the solution. The option will also add a new project into the solution and add  reference from the arduino project to the library.

When working with source control it is important to keep the solution and project(s) folder structured proerly. The ideal is as follows:-

Solution Folder (.sln)
     MainProject1 (.vcxproj)
     Libraries
          Library1 (.vcxitems)
          Library2 (.vcxitems)

Next to each folder example above I have shown the names of the file extensions. These are the Visual Studio files that keep track of what is included at each level and where the files are located. These files are just text files that you can edit, if you ever want to move things around to re-structure that can be useful. The files should contain relative paths which means the same structure will work on a diffrent machine or from a different location. The relative paths are one main reason for keeping a neat/simple folder structure.

If you opened an existing Arduino project the solution (.sln) might be in the same folder as the arduino project (.vcxproj) and the .ino./source code. If so it is a good idea to drop the project down one level leaving the .sln in a parent folder. If you create a new project using "File>New>Project>C++>Arduino Project" then Visual Studio will automatically create the .sln in a higher folder to the project (.vcxproj).

Finally, I guess you don't mind installing the Arduino IDE on both machines? If not then use the NoIDE option in Visual Micro but then you might need to use the Visual Micro Library Manager to install libraries such as EEPROM and SPI that are often used from the installed ArduinoIDE\libraries folder.

You should find it quite easy to ensure the correct structure and I reccomend doing it as soon as possible.

Let us know how it goes.





Back to top
 
WWW  
IP Logged
 
Ade
Newbies
*
Offline



Posts: 2
Re: Using visual micro with Visual studio and github
Reply #2 - Oct 26th, 2019 at 5:11pm
 
Thanks for the reply... I haven't had a chance to get back to this yet, but will try it over the next few days and let you know how I get on

Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print