Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
[Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others (Read 376 times)
RobinBlood
Newbies
*
Offline



Posts: 7
[Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Feb 13th, 2020 at 6:55pm
 
Hi,

I'm using the Streaming Lib in near enough every project (thanks again Mikal Hart)
I cannot recommend this enough!

I just stumbled across visualmicro to find a solution with the growing number of files in my project. The Import from Arduino to VisualStudio was somewhat ok, but I struggled a lot with the Arduino-Path. I'm using the WindowsStoreApp 1.8.29.0 and it was quite difficult to find the Toolpath.

Anyway, the Project compiles great (what it already did on Arduino) but I've got errors all over every file because I used the streaming.h -> Unfortunately every "endl" shows up as an Error.

also, I had some functions declared after "setup" and "loop" that I needed to prototype in front of them to avoid errors.

And don't get me starting with ArduinoJson.
He doesn't like the classes, the typedefs, the inline-statements or any of it  Wink  but it compiles great  Smiley

I may need to mention that I've got Resharper Ultimate installed on my VisualStudioPro, so I'm not really sure which one does what but maybe you could look inside it.

Best Regards
Robin
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10555
United Kingdom
Re: [Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Reply #1 - Feb 13th, 2020 at 7:35pm
 
Hi

We are looking at the new release(s) of the ArduinoJson which does cause a lot of intellisense issues. Older versions of the same library are a lot better but not perfect.

The StreamingLib sounds interesting we will look at that.

The automatic creation of prototypes is currently moving to the same sytem the arduino ide uses. Currently you can enable prototype generation in the Project Properties (F4) which would have then added them for you, however the placement of them will improve further with ctags.

I don't understand this part of your report except to say that windows store app is not supported due to the permissions problems that it brings. Please always install the standard exe arduino ide version or zip from arduino.cc downloads page. If you click the "Download IDE" button on the Visual Micro IDE Locations dialog that takes you to the correct downloads.

I have no idea why you would need to find the toolspaths but I suspect this confusion is due to using th windows store version. In normal use all paths will be found without your having to change anything.



Back to top
 
WWW  
IP Logged
 
RobinBlood
Newbies
*
Offline



Posts: 7
Re: [Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Reply #2 - Feb 13th, 2020 at 8:03pm
 
Yes, that was probably the reason for the toolpath issue.

I might have adjusted the settings a bit to access the WindowsApps, and it works fine. Can compile without issues.

Attached is one of the occurrences of the "endl" and the dialog that I got when I started VisualStudio with all current (working) settings.
Back to top
 

vmicroDialog.jpg (118 KB | )
vmicroDialog.jpg
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10555
United Kingdom
Re: [Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Reply #3 - Feb 13th, 2020 at 8:15pm
 
I need to see your build output as requested in the yellow box above. In my test with the ArduinoJSON library and Streaming everything is okay. I see there is another library of the same name called ArduinoJson which is the one that gives intellisense errors in our earlier tests.

The ArduinoJSON library is by Arduino

With the following code on an esp32, the "endl" issue does not appear.

I suggest delete myDocuments\Arduino\Libraries\ArduinoJson and install the ArduinoJSON library.

Code:
#include <Arduino_JSON.h>
#include <Streaming.h>


const long BAUD = 115200;

const int lettera = 'A';
const int month = 4, day = 17, year = 2009;

const long LOOP_DELAY = 1000;

void setup()
{
  Serial.begin(BAUD);
}

void loop()
{
  Serial << "This is an example of the new streaming" << endl;
  Serial << "library.  This allows you to print variables" << endl;
  Serial << "and strings without having to type line after" << endl;
  Serial << "line of Serial.print() calls.  Examples: " << endl;

  Serial << "A is " << lettera << "." << endl;
  Serial << "The current date is " << day << "-" << month << "-" << year << "." << endl;

  Serial << "You can use modifiers too, for example:" << endl;
  Serial << _BYTE(lettera) << " is " << _HEX(lettera) << " in hex. " << endl;
  Serial << endl;

  delay(LOOP_DELAY);
}
 

Back to top
« Last Edit: Feb 13th, 2020 at 8:16pm by Visual Micro »  
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10555
United Kingdom
Re: [Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Reply #4 - Feb 13th, 2020 at 8:22pm
 
I just retested ArduinoJSON latest library and don't have the issues seen for other boards. So knowing the info requested above will probably help replicate.
Back to top
 
WWW  
IP Logged
 
RobinBlood
Newbies
*
Offline



Posts: 7
Re: [Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Reply #5 - Feb 13th, 2020 at 8:55pm
 
Visual Micro wrote on Feb 13th, 2020 at 8:15pm:
I need to see your build output as requested in the yellow box above

OR
Click here to Email us with the file attached, and a link to your post
---
Email was sent a few minutes after posting the thread
(bcc to one of my other emails where it arrived at 20:15 GMT+1)

I will strip-down my project and send you a copy with screenshots, this could take an hour ...
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10555
United Kingdom
Re: [Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Reply #6 - Feb 13th, 2020 at 9:04pm
 
Ah okay I see it. I don't think there is any point in investigating while you are using the windows store ide as back end. It could sent us in circles.

Please download the arduino zip into a simple trusted location such as "c:\arduino\ide" from here https://www.arduino.cc/en/main/software

Then change visual micro IDE location to point to the newly unpacked ide. You can also use the windows installer link above the zip but it does nothing more than install usb drivers you already have installed.

Click Rescan or restart the ide after making the changes to the ide. If your boards are missing then re-enable them in board manager.

After this your toolchains and all build elements will have the correct permissions.



Back to top
« Last Edit: Feb 13th, 2020 at 9:06pm by Visual Micro »  
WWW  
IP Logged
 
RobinBlood
Newbies
*
Offline



Posts: 7
Re: [Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Reply #7 - Feb 13th, 2020 at 10:00pm
 
Ok, they just released 1.8.12 a few minutes ago Smiley
Busy setting up everything, one thing I just realized ...

I have two "Documents" Folders. OneDrive linked the System Folder to its Documents and I have another one below my User. Both had Arduino-Files in them.

I cannot redirect the "Documents" to the subfolder of my User. I will continue anyway and create a new ArduinoProject instead of opening one from my harddrive.
Back to top
 
 
IP Logged
 
RobinBlood
Newbies
*
Offline



Posts: 7
Re: [Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Reply #8 - Feb 13th, 2020 at 11:21pm
 
Visual Micro wrote on Feb 13th, 2020 at 8:15pm:
I suggest delete myDocuments\Arduino\Libraries\ArduinoJson and install the ArduinoJSON library.

I intentionally use the library "ArduinoJson version 6.14.1" from Benoit Blanchon because I like his Assistant on the Website. It's also used by PlatformIO and works great.

Anyway, Email sent, attached screenshot and console-output is inside the zip. Need to sleep a bit, it's already past midnight  Undecided

Thanks for the support and best regards
Back to top
 

 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10555
United Kingdom
Re: [Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Reply #9 - Feb 14th, 2020 at 12:38am
 
Thanks, yes it looks brilliant. We will try t resolve those intellisense errors in the next release.
Back to top
 
WWW  
IP Logged
 
RobinBlood
Newbies
*
Offline



Posts: 7
Re: [Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Reply #10 - Feb 14th, 2020 at 9:47am
 
btw. if I switch to an ESP8266-board, the Intellisense errors disappear (except "size_t") build, rebuild, ...
switching back to ESP32 and there they are  Roll Eyes
So some part already works, looks like there is an issue with ESP32
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10555
United Kingdom
Re: [Intellisense Error]Visual Studio 2019 - streaming.h, ArduinoJson and others
Reply #11 - Feb 14th, 2020 at 1:07pm
 
Thanks for the info. With STM32 the AruinoJson shows 300+ errors so Esp doesn't suffer so much. In any event we will be looking at solutions.
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print