Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • 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
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Using visual micro with Visual studio and github (Read 2372 times)
Ade
Newbies
*
Offline


Posts: 2
Joined: Oct 15th, 2019
Using visual micro with Visual studio and github
Oct 15th, 2019 at 4:56pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using visual micro with Visual studio and github
Reply #1 - Oct 19th, 2019 at 2:51pm
Print Post  
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
Joined: Oct 15th, 2019
Re: Using visual micro with Visual studio and github
Reply #2 - Oct 26th, 2019 at 4:11pm
Print Post  
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
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Using visual micro with Visual studio and github
Reply #3 - Feb 26th, 2020 at 3:42pm
Print Post  
Hi, i currently have the entire visual micro and visual studio solution in a repository which i use on 2 different computers. It seems to work fine, when moving from one device to another, the IDE sometimes needs restarting but it works ok.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint