Quote:Hmmm. The definition and explanation in the documentation page are rather unclear then.
If the defines in the project source do not get passed to the libraries, why do you need to invalidate/rebuild them if the defines change?
Yes it's a tricky area. I think that feature was added long ago for the ArduPilot drone project that had a modified ide. Probably needs to be removed because normal arduino doesn't work that way.
Quote:However I find that with 3 (or more) top level projects in my solution, along with multiple shared libraries, that when you update the defines in the UI, it often does not update the project or updates the defines in the wrong project.
I can look at this if needed but it is an area that can be confusing due to the way VS works. There is a mini button above the solution explorer that auto synchronizes the solution explorer with the active code that is being edited. If that option is off (which is how I prefer to work) then the active code and the solution explorer are two different selections.
You might think that clicking the solution explorer should always be the selected project or vica versa. However if you look at the Project, Build and Debug menu you will see which project VS thinks is active. It's not always the one you would think should be active.
Then when you press F5 to upload which project is uploaded? The one being edited or the one selected in the solution explorer.
Maybe the bug is that the project properties are not refreshing correctly.
Which version of VS are you using exactly?
Quote:This would be much better as a popup window with a grid of defines with optional values rather than the ; delimited list it currently is.
Yes its on the list. Time is short and Microsoft/Arduino in VsCode with the linux, mac and some windows users are taking all the blogs and pr so i'm spending more of the available time considering marketing at the moment. I don't think windows/vs users like blogging or tweeting much
Quote:It is also not entirely clear where this is stored in the project file. I was expecting it to be the ItemGroup for Preprocessor Definitions so that intellisense would work the same as the build but that doesn't appear to be the case.
There are defines required to make vs intellisense work which would interfere with the build (because the real compiler sets what it wants accurately). Therefore the standard vs project defines need to be automatically updated with "stuff" that makes intellisense work.
Global defines are stored in a section of the project or .user file. We use global project properties but you have to use the project properties for now. If you put it at the bottom of the screen it can take the full length so is easier to work with.
Defines for the configuration are stored in the xml files in the \_vm folder. You will see the file names contain the project name and the configuration name. However because vs sends messages to show the project properties many times the files are cached. There is only one cache for all projects in a solution, so clicking between two top level projects should invalidate it.
Quote:Is there detailed references for the files generated / in use and what settings are stored where? I can't find much in the documentation part of the site.
The site is in the process of being re-done with a new better documentation/wiki area. Will add to that but there are only the config specific files I have mentioned and properties in the proj.