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 How to use solutions and projects (Read 200 times)
perigalacticon
Junior Member
**
Offline


Posts: 67
Location: detroit area
Joined: Nov 7th, 2016
How to use solutions and projects
Oct 6th, 2026 at 11:47pm
Print Post  
I am a beginner at VM coming from 10yrs of work with Arduino IDE as a hobbyist.  I would like to understand how to use the solutions feature of VM.  

In Arduino IDE when working on a project I would often open a myriad of sketches and possibly separate IDE instances to gather information for the project sketch and also to have separate settings for individual opened sketches.  For instance related other sketches and examples, all of which may or may not have any relation.  

I found when I open an existing Arduino project in VM, it makes a 'solution' with the same name as the Arduino sketch/project, and there are files that seem to be related to the solution saved in the original Arduino folder.

Is it possible to create a 'solution folder' with an arbitrary name, such that the solution is independent of the project files that are opened when working on the project.  There is no relation among the sketches/ino files other than I have opened them as reference material for a project.  And then is it possible to open the solution and have it load the reference files from their original stored locations, rather than saving them in the proposed 'solution folder'.  I haven't worked with other programming IDEs, I am mainly a Arduino hobbyist so please excuse my ignorance about this subject.

Thanks,
Stephen
« Last Edit: Oct 6th, 2026 at 11:49pm by perigalacticon »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12261
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to use solutions and projects
Reply #1 - Oct 7th, 2026 at 1:30am
Print Post  
They are good questions. 

It's more flexible than you might realise. As an aside I recommend exploring Copilot in Visual Studio 2022+. There's a [url]visual micro toolbar button[/url] that enables copilot integration so you can attach the "visual micro core help" resource in Copilot chat via the + button. That would then answer the question.

In short, you can use the standard Visual Studio file new menu to create an empty/blank solution in a folder and with a name that is your choice. It creates a .sln file, that's a solution. You can edit them in notepad if you ever want to alter file/folder locations that it points too or use the UI in visual studio via the Solution explorer.

If you have your own solution open, when you use the visual micro file > open >arduino project, it will add it to your solution and create a sketchName.vcxproj file. you only need to use that menu item once per sketch. after that, again use standard vs functionality to open and close, such as file > open or the recent list.

You can open an unrelated ino at any time with file > open > file or drag drop from windows explorer.

You can right click in the solution and create "solution folders". those are virtual names that allow you to organise individual files or projects into groups. has no bearing on the physical file or folder location and is only required if you want other references or collaterals. 

You might use one solution or one solution per project. multiple projects in a solution will automatically provide separate board/config per project. therefore different projects can build different arduino projects for different boards within a single solution.

Or you can open multiple ide instances and have one project/solution open in each. 

One point to note with multiple projects in a single solution is visual studio has the concept of a "Start-up Project". It's name appears in bold, it means that when you click build solution it knows which project to build. you will see there will also be a "build project [name]" menu if you want to build the currently active project. the vMicro build button and menu items use the currently active sketch code to determine what to build or upload. Visual Micro also allows us to override Visual Studio's start-up project behaviour, to work the way visual micro commands work. You can use any build command from the UI, visual micro intercepts them all for arduino projects. Right click a project name in the solution explorer to set the Startup project.

When you add a file to a solution (right click in the solution explorer and add existing item) select "Link" otherwise it copies the file over to the solution rather than linking to where the file exists. For normal arduino code in a real sketch don't use link it complicates things. Link is for ancillary solution files.


https://www.visualmicro.com/page/User-Guide.aspx
https://www.visualmicro.com/page/User-Guide.aspx?doc=Visual-Micro-AI-Copilot-Sup...

Suggesting reviewing the File menu. Add existing project can be useful too. Remember first time you want to open a sketch use file > open arduino project so that the proj file is created for you. "File > New >arduino project" works same as arduino ide, creates the sketch in the documents/arduino folder. or use the visual studio "file > new > Project" where you will find some visual micro project templates as as "blank arduino project". The VS commands give you more control over locations.
« Last Edit: Oct 7th, 2026 at 1:57am by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint