James Mulling
James Mulling

Reputation: 75

How can I see Arduino libraries in the Visual Studio class explorer?

I am using the Arduino plugin for Visual Studio to edit a complex Arduino sketch that uses libraries.

When I click F12 GoTo definition on any libarary syntax the correct library file opens in Visual Studio which is great. (I also see intellisense for the libraries).

However, when I open the class explorer the libraries are not listed.

How can I see the libraries in the class explorer? Is this possible?

Upvotes: 2

Views: 2551

Answers (1)

Visual Micro
Visual Micro

Reputation: 1561

You need to include the library sources directly in your Visual Studio project. The easiest way to do this is to click "vMicro>Toggle Hidden Files".

The menu item is a toggle, this means that clicking it once will add all of the library sources to the project and clicking it again will remove the library sources from the project.

This is a safe feature, it will not break the arduino compile but you should be careful if you use the "Find & Replace In Files" feature of Visual Studio because it will include the library sources.

NB: If you use the "Toggle Hidden Files" feature you will also see the Arduino core in the class explorer and in your project under the "src_Micro-Api-Readonly" folder.

Tips:

You can link any files into your Arduino projects. The Arduino compiler works independently of the Visual Studio project configuration by following the normal Arduino rules.

Folders showing the "hidden" files can be manually removed from the project when no longer required. Removing manually is the same as clicking the menu item again.

Upvotes: 2

Related Questions