Tim@Visual Micro wrote on Aug 27
th, 2017 at 6:59pm:
If you create Project1 and Project2 in the same solution...
1)
Select Project1 in the solution explorer and ensure that Project2.ino is open as a table in the editor
Then take a look at the standard VS "Build" menu, you will see the following it has some options for "Build Project2" and not build Project1
No, it behaves differently.
A file from Project3 is shown in the current tab.
The Build menu shows "Build Project3".
I click on Project1 in solution explorer.
The Build menu shows "Build Project1".
The file from Project3 is still the active tab.
Now I open a file from Project2.
The file from Project2 is now the active tab.
The Build menu shows "Build Project2".
The Build menu always follows my mouse clicks. No matter wether I select a tab of an open document, open another document or click around in source explorer. In all cases my last mouse click decides what the Build menu considers the project to build.
The toolbar of VisualMicro follows this logic in most cases. But in some cases it misses the switch command.
Quote:2)
Set a specific board for Project2.ino and then switch the editor tab to Project1.ino.
Select a different board for Project1.ino
3)
With Project1.ino still selected as the active editor tab, right click Project2 in the solution explorer and select "Start new instance" or "launch" or whatever you can find that debug/runs a normal vs project. This command should use the board or Project2 and build/upload. Does it do that?
No. It uses Project1.
But if I click a second time with the right mouse key on the project node while the context menu is open, so that the context menu is closed and re-opened, Project2 is selected. Also the selection in the board drop-down switches with this second mouse click.
Quote:So to re-cap, in this case you would expect to be able to use the solution explorer to build a project for board A while the active editor/board shows board B.
That was my expectation but as I now found out the project selection only becomes active after a second mouse click. that could explain the erratic behaviour I erperienced because I did everything by context menu and did not observe whether I opened the context menu with the first click on a project or with a later click.
Quote:5)
If you click Debug>Start VS will tell Visual Micro to build the current startup project using whichever board has been specified for the project. If no board has been specified the currently selected editor board will be used.
I would prefer to have a "no board selected" entry in the drop-down instead of Visual Micro using whatever board the project clicked before had selected.
Thanks for the explanations.
Arecon