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
Hot Topic (More than 8 Replies) VS2022 - won't build (Read 6255 times)
Eric T
Junior Member
**
Offline


Posts: 14
Joined: Jan 4th, 2022
VS2022 - won't build
Jan 4th, 2022 at 4:43pm
Print Post  
New installation, but nothing builds. For the attached log, I created new project, with no code added (i.e. it's just empty setup() and loop().  Build failed because it can't find <arduino.h>.  I also tried to rebuild working project (on VS2019), and it failed with missing standard library files.
Thanks
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2728
Joined: Feb 13th, 2019
Re: VS2022 - won't build
Reply #1 - Jan 4th, 2022 at 5:23pm
Print Post  
Thanks for the report, it appears it is not picking up the Esp8266 core files correctly.

Can you confirm the below location is correct for your Sketchbook folder?
C:/Users/eric/OneDrive/Documents/ArduinoAttempt1

And that the Arduino IDE is installed in the below folder?
C:\Program Files (x86)\Arduino

  
Back to top
IP Logged
 
Eric T
Junior Member
**
Offline


Posts: 14
Joined: Jan 4th, 2022
Re: VS2022 - won't build
Reply #2 - Jan 4th, 2022 at 6:14pm
Print Post  
I'm not sure what the sketchbook folder is.  If it is where the blinky.ino file should be, then no.  That is at C:\Users\eric\source\repos\Blinky
I do have a folder at the Sketchbook you name.  It's an old Arduino project from July 2020, but I notice that when I added some libraries for the project I was working on when I updated to vS2022, it put the libraries into the old sketchbook folder instead.
The Arduino IDE folder is correct.
  
Back to top
 
IP Logged
 
Eric T
Junior Member
**
Offline


Posts: 14
Joined: Jan 4th, 2022
Re: VS2022 - won't build
Reply #3 - Jan 4th, 2022 at 8:53pm
Print Post  
To be more specific regarding the Sketchbook folder:
- for the project that I sent you the log for:
- solution in c:\Users\eric\source\repos\Sketch2020_ESP8266
- project file and INO in c:\Users\eric\source\repos\blinky

If you want to poke around in my computer, let me know and we can set up a quick-support session.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2728
Joined: Feb 13th, 2019
Re: VS2022 - won't build
Reply #4 - Jan 6th, 2022 at 3:59pm
Print Post  
If you remove, and then re-install the board package from the Micro Explorer, does this improve?
  
Back to top
IP Logged
 
Eric T
Junior Member
**
Offline


Posts: 14
Joined: Jan 4th, 2022
Re: VS2022 - won't build
Reply #5 - Jan 6th, 2022 at 4:32pm
Print Post  
I have three Board Platforms: Arduino, ESP8266 and ESP32. 
I removed ESP8266, then re-installed it.  Now, instead of not finding Arduino.h, it can't find stdlib.h.  Attached is the verbose log.  Thanks.  BTW, my build for Arduino board works, and I don't have a project yet for the ESP32, but I want to start one.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2728
Joined: Feb 13th, 2019
Re: VS2022 - won't build
Reply #6 - Jan 6th, 2022 at 4:56pm
Print Post  
Thanks for the update, however re-installing the core should have also ensured this file is present at the below location, can you confirm if it is there?
Code
Select All
c\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\stdlib.h 



It may be best to follow the below steps to ensure the board packages are installed cleanly:
  1. Close all instances of Visual Micro and the Arduino IDE.
  2. Rename or Remove the folder C:\Users\eric\AppData\Local\Arduino15
  3. Install the ESP8266 board package
  4. Run Build > Clean Solution in your project
  5. Then try building again


  
Back to top
IP Logged
 
Eric T
Junior Member
**
Offline


Posts: 14
Joined: Jan 4th, 2022
Re: VS2022 - won't build
Reply #7 - Jan 6th, 2022 at 7:15pm
Print Post  
I've checked for the stdlib.h, as per above, but do not have the folder xtensa-1x106-elf in the bed folder... see screenshot.
I then closed Visual Studio and renamed the Arduino15 folder. After re-installing the board package I end up with the same missing xtensa-1... folder.  i.e. no change.  Interestingly, in my OLD arduino15 I am missing the hardware\esp8266\3.0.2\libraries folder.  See 2nd screenshot.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2728
Joined: Feb 13th, 2019
Re: VS2022 - won't build
Reply #8 - Jan 6th, 2022 at 7:59pm
Print Post  
Thanks for the information.... could you remove the Arduino15 folder, and reinstall the package via Arduino IDE?

This should help us identify if its a different root cause to the problem (e.g. Virus Checker)
  
Back to top
IP Logged
 
Eric T
Junior Member
**
Offline


Posts: 14
Joined: Jan 4th, 2022
Re: VS2022 - won't build
Reply #9 - Jan 6th, 2022 at 9:13pm
Print Post  
Oh boy - I never use Arduino.  But I had upgraded to 1.8.19 over Christmas as well.  So just in case I now uninstalled and reinstalled it.  I then figured out how to add a board package in Arduino, and did so for ESP8266.  It now has that folder you pointed out.
I next opened VS2022, and the 8266 code now compiles. Thank you!
Now should I add the ESP32 package through Arduino, or do you want me to try using Visual Micro.  I don't mind being your guinea pig...  Smiley
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2728
Joined: Feb 13th, 2019
Re: VS2022 - won't build
Reply #10 - Jan 7th, 2022 at 1:56pm
Print Post  
If you have time, could you try installing the ESP32 package with vMicro?

If it fails again, then uninstall it using vMicro, and install it using the Arduino IDE to ensure you stay up and running.
  
Back to top
IP Logged
 
Eric T
Junior Member
**
Offline


Posts: 14
Joined: Jan 4th, 2022
Re: VS2022 - won't build
Reply #11 - Jan 7th, 2022 at 4:10pm
Print Post  
I installed the ESP32 package with vMicro, and it seemed to install fine.  However when I try build a simple INO with empty setup and empty loop, I get an error of No such file for stdint.h (see att. log).
I will next uninstall the board package, and try from arduino IDE
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Eric T
Junior Member
**
Offline


Posts: 14
Joined: Jan 4th, 2022
Re: VS2022 - won't build
Reply #12 - Jan 7th, 2022 at 5:03pm
Print Post  
When installing with Arduino IDE, I used json link from here: https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-window...;  
When installed with Arduino, it worked.  But while I could download 2.0.2 with vMicro, Arduino gave me 1.0.6 as the latest version.  Maybe that's the reason...

Is there anything I can do to help you figure out if there's any other problem?  Maybe I should try to install 1.0.6 using vMicro?
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2728
Joined: Feb 13th, 2019
Re: VS2022 - won't build
Reply #13 - Jan 7th, 2022 at 5:20pm
Print Post  
Thanks for the update.

You may have the below JSON URL set in vMicro on the vMicro > General > IDE Locations screen, but not set in the Arduino IDE, File > Preferences screen:
Code
Select All
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json 



The JSON URL from the RNT tutorial posted only lists cores up to 1.0.6, so the above URL will allow both IDE's to use the same versions.

If you can install the same version of the core in vMicro and Arduino IDE it will give a like for like comparison, and hopefully highlight if there is an issue with vMicro with this package as well.
« Last Edit: Jan 7th, 2022 at 5:21pm by Simon@Visual Micro »  
Back to top
IP Logged
 
Eric T
Junior Member
**
Offline


Posts: 14
Joined: Jan 4th, 2022
Re: VS2022 - won't build
Reply #14 - Jan 7th, 2022 at 7:37pm
Print Post  
I uninstalled 1.0.6 using Arduino IDE, then installed 2.0.2 using Arduino.  This causes my build to work.  Attached is the build log, note the missing path error message at line 794 in the old log (called esp32_log.txt) which I sent earlier.  I'm diff'ing the latest log attached to this message, with that old log. 
I wish I had made a copy of the Arduino15 folder...  If you want I can make a copy of my current one, uninstall and reinstall through vmicro and then send you the 'arduino' version and vmicro version of that folder
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Brad H.
Newbies
*
Offline


Posts: 1
Joined: Jan 20th, 2022
Re: VS2022 - won't build
Reply #15 - Jan 25th, 2022 at 9:48pm
Print Post  
Not to kick up old posts, but I've just spent the past three days struggling with this same problem (for ESP8266). Your suggestion (Simon) of deleting the ...15... folder, and installing the board package through the original Arduino IDE did finally work for me.

VS 2022 Community, Win10
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint