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 Source Control (Read 10652 times)
Terence Golla
Newbies
*
Offline


Posts: 4
Joined: Jul 5th, 2014
Source Control
Jul 6th, 2014 at 4:15pm
Print Post  
As I evaluate Visual Micro I’m thrilled with IntelleSence for Arduino code, debugging is great but could really use the ability to work in libraries and now we get to source control. To which I’m really surprised there are no conversations on source control in the forum.

I’m working with TFS to test source control.  I built a TFS project with a source control folder ($Arduino) and mapped it to documents\arduino.  Then I did an add to folder (mistake I will talk about later) and was surprised to find VS knew about .INO files and considered them as a file worth checking in to source control (cool).
  
Now for the mistake…  Opening the solution I got a complaint about trying to write to vsarduino.h in the \Visual Micro directory.   I checked the file out and all was good.  Next I compiled the sketch using ‘Start Without Debug’ with no problems.  Next I tried ‘Start Debug’ and again complaints about several XML files in \Visual Micro (Compile.vmps.xml, Configuration.Debug.vmps.xml, Upload.vmps.xml). 

First question: In testing (deleting) the files in the \Visual Micro directory and removing them from source control it appear that they are created as need and don’t need to be keep in source control. True?

Second Question: What exactly is being stored in the .SDF file and should it be considered worthy of source control?

Third Question: Where exactly is VS hiding debug break point information?

The only other issue I’ve encountered at this point with source control is using ‘Show All Sketch Files’ which will cause you to be prompted with a dialog for all the files in _core and _ library that reads ‘You are attempting to add an item to a source-controlled project, but the item’s path has no mapping.  If you continue with the add, this item will not be added to source control.  Do you wish to proceed with the add?”.  You will also get messages similar to the following in the output window if you add the item.

There is no working folder mapping for C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino.
There is no working folder mapping for C:\Program Files (x86)\Arduino\hardware\arduino\variants\standard.
There is no working folder mapping for C:\Program Files (x86)\Arduino\libraries\SoftwareSerial.
There is no working folder mapping for C:\Program Files (x86)\Arduino\libraries\EEPROM.

Now you can proceed by clicking the “Add the item”.  I’ve also considered mapping the C:\Program Files (x86)\Arduino\ directory.  And I’m wondering if there isn’t some VS magic setting you could set when adding the arduino core and library files as I’ve noticed that source control is very uninterested in varduino.h listed in the Header Files folder.

Fourth Question: Any thoughts on this?

Note to Readers: If as a developer you are not using one of many source control products available you will be taken out and shoot tomorrow.  Hint: That’s enough time to implement source code and prevent your demise (no excuses).
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Source Control
Reply #1 - Jul 6th, 2014 at 6:10pm
Print Post  
Hi Terence,

Good questions but remember that most users manage source control the way the Arduino manages it. Zip Smiley Seriously though it does depend on the size of the project and as you have found it adds complexity which some people do not need.

I can't answer all questions as they will be documented in the Vs help system.

Problem of debug libraries. The current issue is that the sketch sources are copied to a temp folder so adding debug statements is easy. For libraries they stay where they are so no easy opportunity to alter the temp copies. The alternative would be to copy all the libraries to a temp folder prior to compile which might be considered for the future.

The \Visual Micro sub folder contains xml files with project settings and a .h file for intellisense. The .h is not a part of compilation and is created on the fly to support the intellisense. It can be excluded.

SDF, this is a Microsoft file. Different versions of VS use different files for different stuff

Sorry, I don't know the answer to which setting tells VS not to try to add source control for linked files in virtual solution folders.

Sorry can't be more help but it would be good to hear anything you find out

Thanks
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Source Control
Reply #2 - Jul 6th, 2014 at 9:45pm
Print Post  
Sorry i was in a rush earlier.

The breakpoints are stored by VS in the solution file. For Visual Studio that is .sln for Atmel Studio that is .asln. It's annoying I would prefer they were stored with each project but I guess this allows you to have different solutions with different configs of the same project.

As for source control I think someone else has made a forum note about that. They got it working okay although didn't mention "all all sketch files" which I will test when time allows.

It would be nice to write a page on viaualmicro.com with an overview of how to use source control with Arduino so if we can change anything obvious we will.

The vsarduino.h begins with a . so i think that is why it is ignored. Maybe that's a clue to a solution or maybe just exclude the entire /Visual Micro sub folder of the sketch from source control. This folder is not required to build an Arduino project.
« Last Edit: Jul 6th, 2014 at 9:51pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tom How
Newbies
*
Offline


Posts: 2
Joined: Jan 30th, 2013
Re: Source Control
Reply #3 - Aug 4th, 2014 at 12:28pm
Print Post  
I find source control works best if you exclude the .vsarduino.h from source control entirely.

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Source Control
Reply #4 - Aug 4th, 2014 at 1:24pm
Print Post  
Yes the vsarduino.h and the project files are re-built when required. They are not used during compile and are not considered a part of the source control system for Arduino projects.

These files are for intellisense only so can be safely ignored

  
Back to top
IP Logged
 
Socal Sam
Newbies
*
Offline


Posts: 3
Location: So California
Joined: May 12th, 2014
Re: Source Control
Reply #5 - Aug 19th, 2014 at 8:46pm
Print Post  
I have just started examination of the Team Foundation Services and Visual Micro, which is a great pairing, but the problem isn't only with Microsoft, GIT appears to require that all of the files be in the same folder as the solution folder, I am not clear on what files are not in the solution file.  When you attempt to put your code into TFS set up for GIT you get the message:
Quote:
Source Control - Git
The current solution has projects that are located outside the solution folder.  These projects will not be source controlled in the Git repository.  To add all the projects to a single Git repository please consolidate all projects under a single folder.


I have not had time to examine this issue, so any help would be nice. Wink

« Last Edit: Aug 19th, 2014 at 8:47pm by Socal Sam »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Source Control
Reply #6 - Aug 19th, 2014 at 8:57pm
Print Post  
I think that is a generic source control error you get if the solution (.sln) is in a different folder root than the project

This probably means the solution is in a location such as documents/visual studio/projects and the sketch is in document/arduino/sketch/

While you are getting to know things it is best to force vs to save the solution in the sketch folder (when prompted). 

If you already have a solution in the wrong place you can either close the solution then manually move it to the sketch folder using windows explorer or click the solution name in the tree view and click "File>Save Solution As" into the sketch folder.

Visual Micro will work better with the solution in the same folder as the project simply because when you attempt to open the sketch it will open it automatically. 

tip: Once you have a project and/or solution you can use the standard Visual Studio "File" menu items to open your Arduino projects.
« Last Edit: Aug 19th, 2014 at 8:58pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint