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) Visual Micro for VS 2019 - "Upload Last Build" stopped working (Read 615 times)
crick
Newbies
*
Offline


Posts: 4
Joined: Jun 4th, 2020
Visual Micro for VS 2019 - "Upload Last Build" stopped working
Mar 15th, 2025 at 12:54am
Print Post  
Today, the "Upload Last Build" feature of Visual Micro for VS 2019 stopped working.  The "Micro Build" Output is like that shown below.
Before selecting "Upload Last Build", I can see in the build folder that the last build happened and there are the appropriate .bin files.
After selecting "Upload Last Build" all the files in the build folder get deleted (which should not occur!) so of course the upload then fails.

This feature used to work great but now it is broken.

I was using build 2025_0120_1900 so I just upgraded to 2025_0314_1900.  However, the problem persists.

Any advice on what has gone wrong and how to fix the problem?

------------------------
Uploader started for board ESP32 Dev Module(esp32_esp32)
Upload method will be: bootloader
Uploading via Bootloader 
ool.exe --chip esp32 --port "COM7" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 .ino.bootloader.bin" 0x8000 .ino.partitions.bin" 0xe000 s/partitions/boot_app0.bin" 0x10000 .ino.bin"
usage: esptool write_flash [-h] [--erase-all]
                           [--flash_freq {keep,80m,60m,48m,40m,30m,26m,24m,20m,16m,15m,12m}]
                           [--flash_mode {keep,qio,qout,dio,dout}]
The uploader process failed
                           [--flash_size {detect,keep,256KB,512KB,1MB,2MB,2MB-c1,4MB,4MB-c1,8MB,16MB,32MB,64MB,128MB}]
                           [--spi-connection SPI_CONNECTION] [--no-progress]
                           [--verify] [--encrypt]
                           [--encrypt-files <address> <filename> [<address> <filename> ...]]
                           [--ignore-flash-encryption-efuse-setting] [--force]
                           [--compress | --no-compress]
                           <address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: .ino.bootloader.bin'
------------------------
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #1 - Mar 17th, 2025 at 10:07am
Print Post  
Thanks for the report, we will investigate where the points of failure could be for this process.

To help us see all settings, can you enable the below options:
  • vMicro > Compiler > Verbose
  • vMicro > Compiler > Show Build Properties
  • vMicro > Uploader > Verbose


Then perform a Build and Upload, and attach the complete output as a text file for us to review?

If you can the do the Upload Last Build and attach the output from that as a seperate text file as well it will help greatly.
  
Back to top
IP Logged
 
crick
Newbies
*
Offline


Posts: 4
Joined: Jun 4th, 2020
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #2 - Mar 20th, 2025 at 3:52pm
Print Post  
Thank you for that response.  When I made my post, the "error" was happening very frequently (but not every time).  While waiting for your thoughts, I did other (non Visual Micro related) work.  After your response, I went back to gather the build data you requested but I could not replicate the error - very frustrating.   

I can watch for it to recur but it means that I will have always do a build and then a separate "upload last build".  This also means that I will always need to save to a file every build in the hopes that the subsequent "upload last build" gives the error.  That is starting to sound tedious.  Is there a way to have Visual Micro save the output of each build to a separate log file?  If so, then I can do that and, when the "upload last build" error occurs again, I can just send the most recent build log that is associated with that error.

Please let me know if that is a possibility.

Related question:   

What would cause the "upload last build" feature to delete files in the build folder (For me, using an ESP32 board in Windows, that is the "C:\Users\[username]\AppData\Local\Temp\VMBuilds\[SolutionName]\esp32_esp32\[SolutionConfigurationName]\" folder.   

Normally, the only time I see files disappear from the [SolutionConfigurationName] folder is when I use the Visual Studio "Build > Clean Solution" menu sequence.  Does the "upload last build" feature do some kind of check and then sometimes trigger a "Clean Solution"?  At least that is what it looked like to me.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #3 - Mar 24th, 2025 at 12:52pm
Print Post  
Thanks for the update and detail and persistence with this issue.

If you can upload a log from the project you were using when it happened previously it should give us a good base to investigate. 

Did you change any options between it being built, and the Upload Last Build that you can recall (e.g. Optimization, Board Options, Debugger Selection)?

Some settings will cause the build folder to be cleared (Optimization selection or Debugger Selection).  If the board package is updated then all files would be regenerated on the next build.

We will check the Upload Last Build functionality through again, and your log should give us further information to help replicate this reliably so we can resolve the problem.

There is no current functionality to automatically save them within Visual Micro sadly.
  
Back to top
IP Logged
 
crick
Newbies
*
Offline


Posts: 4
Joined: Jun 4th, 2020
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #4 - Mar 24th, 2025 at 2:35pm
Print Post  
None of the changes you described were done.

One thing that might have been different is that I might have had the option "Save Board, Port and Programmer For Each Configuration" on (I normally have it off).  However I have since then tried "Upload Last Build" with that option both on and off and the "Upload Last Build" worked so that is not, by itself at least, the problem.

Another thing that may be a factor is that I use custom Visual Studio Build Configurations (not "Release" and "Debug" but instead things like "BuildVariant_1" and "BuildVariant_2") to manage the builds on different variants of the same project.  This creates the following types of Visual Micro build paths:

"C:\Users\[username]\AppData\Local\Temp\VMBuilds\Project_A\esp32_esp32\BuildVariant_1\"
"C:\Users\[username]\AppData\Local\Temp\VMBuilds\Project_A\esp32_esp32\BuildVariant_2\"

This approach prevents the various builds from overwriting each other.  To be clear, the differences in the build variants is in my code, NOT in how Visual Micro is configured.  In all cases, I use the same Visual Micro configuration (including the board package, board options, etc. - yes, I know that above I indicated I was trying out the "Save Board, Port and Programmer For Each Configuration" feature at one point but I stopped because I was never actually changing said configuration).

This use of different Visual Studio Build Configurations is a good strategy for my use case though I suspect it may not be commonly used so it is an area you might look at for tracking down this "Upload Last Build" failure issue.

I will email you the Build_Output.txt and Upload_Last_Build_Output.txt files separately.
  
Back to top
 
IP Logged
 
JamesFarmer
Junior Member
**
Offline


Posts: 71
Joined: Mar 1st, 2020
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #5 - Apr 9th, 2025 at 5:38pm
Print Post  
Im having the same issue on both vs22 and vs19 i have attached all required verbose from build from what im seeing it started last week sometime, and it removes data in folder as soon as i hit the upload button

I also get a tool chain error saying the folder does not exist i think is related because something is deleting the contents then 
clean Visual Micro build is required but the temporary build folder was in use and could not be deleted
     Please close all documents that are located in this folder file://C:\Users\beent\OneDrive - Two Sense LLC\Chatterbox\ChatterBoxv4\esp32_ChatterboxV3\Release
  

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


Posts: 2695
Joined: Feb 13th, 2019
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #6 - Apr 9th, 2025 at 5:54pm
Print Post  
Thanks for the report.  From your folder paths it looks like your build folder is being synced by OneDrive.

Does it help if the build folder is located outside of any OneDrive (or other) Synchronisation software which may be causing locks (which generates the error "A clean Visual Micro build is required but the temporary build folder was in use and could not be deleted").
  
Back to top
IP Logged
 
JamesFarmer
Junior Member
**
Offline


Posts: 71
Joined: Mar 1st, 2020
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #7 - Apr 9th, 2025 at 6:40pm
Print Post  
we have been building in this folder for years

I disabled this folder so it is no longer affected by one drive and it is still deleting if click upload button

also its not that it is in use but rather that everything is deleted from the folder
« Last Edit: Apr 9th, 2025 at 7:55pm by JamesFarmer »  
Back to top
 
IP Logged
 
JamesFarmer
Junior Member
**
Offline


Posts: 71
Joined: Mar 1st, 2020
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #8 - Apr 9th, 2025 at 6:43pm
Print Post  
also the issue does not happen tell i t hit the upload button
  
Back to top
 
IP Logged
 
JamesFarmer
Junior Member
**
Offline


Posts: 71
Joined: Mar 1st, 2020
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #9 - Apr 9th, 2025 at 8:52pm
Print Post  
So i ended up reinstalling and reactivating VM and this has seem to fix issue

I think it stemmed from licensing because when i add license last time it never asked me to pick Arduino ide this time it did
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #10 - Apr 9th, 2025 at 9:19pm
Print Post  
Quote:
we have been building in this folder for years
I disabled this folder so it is no longer affected by one drive and it is still deleting if click upload button
also its not that it is in use but rather that everything is deleted from the folder


Understood about the folder, and that it clears when you press the "Upload Last Build" button.

The Build Folder can be set in the project under Tools > Options > vMicro > Compiler > Build Folder (I believe yours is set to:
C:\Users\beent\OneDrive - Two Sense LLC\Chatterbox

Quote:
So i ended up reinstalling and reactivating VM and this has seem to fix issue
I think it stemmed from licensing because when i add license last time it never asked me to pick Arduino ide this time it did

It sounds odd that it didn't prompt for the IDE, and the log attached previously shows it being the "Arduino 1.6/1.8" IDE selection (with the path set to C:\Program Files (x86) Arduino1).

Could you attach the full build output from the same project again so we can review if anything else has visibly changed from the reinstallation?
« Last Edit: Apr 9th, 2025 at 9:21pm by Simon@Visual Micro »  
Back to top
IP Logged
 
JamesFarmer
Junior Member
**
Offline


Posts: 71
Joined: Mar 1st, 2020
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #11 - Apr 22nd, 2025 at 2:15pm
Print Post  
Its back again I have removed one drive from PC to make sure that's not causing it but its still happening i have attached log

Every time it removes everything is see this message below pop up just after i understand that would happen because nothing is in the folder but i dont know what triggering to remove everything 

A clean Visual Micro build is required but the temporary build folder was in use and could not be deleted
     Please close all documents that are located in this folder file://C:\Users\beent\OneDrive - Two Sense LLC\Chatterbox\ChatterBoxv4\esp32_ChatterboxV3\Release
  

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


Posts: 2695
Joined: Feb 13th, 2019
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #12 - Apr 23rd, 2025 at 11:30am
Print Post  
Thanks for the update and continued detail on this issue.

When it clears the Build Folder when clicking Upload Last Build, do you see the .vm_sys folder is still present?

The only way I have been able to replicate this fully is to lock that folder from deletion, which then gives the same error messages you are seeing, and when I click Upload Last Build it clears all files from the build folder (except .vm_sys as it is locked).

Either way we will improve the logging in this area to ensure it is clearer as to the specific reason this is happening.
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #13 - Apr 23rd, 2025 at 11:58am
Print Post  
Thanks for the update and continued detail on this issue.

When it clears the Build Folder when clicking Upload Last Build, do you see the .vm_sys folder (or any other file or suvfolder) is still present?

The only way I have been able to replicate this fully is to lock the e.g. .vm_sys folder from deletion, which then gives the same error messages you are seeing, and when I click Upload Last Build it clears all files from the build folder (except .vm_sys as it is locked).

If this is the case the handle.exe tool from Microsoft can be used to find what is causing the lock:
e.g. handle.exe /acceptEULA "PathToFileOrFolderLocked"

This will show output similar to the below identifying the locking process, which will help determine if it is AntiVirus Realtime Scanning etc..

Either way we will improve the logging in this area to ensure it is clearer as to the specific reason this is happening.
  

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


Posts: 2695
Joined: Feb 13th, 2019
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #14 - Apr 23rd, 2025 at 1:39pm
Print Post  
The latest release (2025.0423.0) has the improved logging for this scenario (example below), and can be downloaded from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

We have also added a documentation page covering this below:
https://www.visualmicro.com/page/Error-Build-Folder-In-Use.aspx
« Last Edit: Apr 23rd, 2025 at 8:58pm by Simon@Visual Micro »  

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


Posts: 71
Joined: Mar 1st, 2020
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #15 - Apr 23rd, 2025 at 9:36pm
Print Post  
so file log2 is the normal build output with everything turned on as stated above 



log3 is what comes up in output when i click upload last build and i watch everything in the folder get deleted
  

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


Posts: 71
Joined: Mar 1st, 2020
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #16 - Apr 23rd, 2025 at 9:47pm
Print Post  
im sorry i just realized the messages in this thread were out of order as far as question about folders all folders are there but they are all empty see attachment

all sub folder are there but all contents are gone no files just folders   

I was able to delete manually all the folders
  

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


Posts: 71
Joined: Mar 1st, 2020
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #17 - Apr 23rd, 2025 at 10:00pm
Print Post  
after updating to the latest build It is not happening now I will continue to watch
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: Visual Micro for VS 2019 - "Upload Last Build" stopped working
Reply #18 - Apr 23rd, 2025 at 10:31pm
Print Post  
Thanks for the detail about the folders, we will continue to look at improving the logging and any resilience we can to this issue.

If it does happen again on the latest build the additional logging should help determine what is locking the folders at the time.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint