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) Files are not saved before building (Read 2864 times)
cortexian
Newbies
*
Offline


Posts: 3
Joined: Aug 17th, 2023
Files are not saved before building
Aug 18th, 2023 at 5:41pm
Print Post  
Visual Micro Version 22 loaded yesterday
Microsoft Visual Studio Community 2022 (64-bit) - Current
Version 17.7.1.   The only extension I loaded is Arduino IDE.

Everything worked fine until I upgraded Visual Studio from 15.x.x to 17.7.1.   Now when I build the project the modified files are not saved.  So the system loads and compiles source that is on disk ignoring my changes.

This happens with CTRL b, VS Run button and the two entries in the Vmicro menu.    As long as I REMEMBER to save my changes I won't be fooled again.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Files are not saved before building
Reply #1 - Aug 18th, 2023 at 5:55pm
Print Post  
Another used reported this. Close the solution and delete the .vs folder from below it. Then re-open. Does that resolve?

It's a VS issue.
« Last Edit: Aug 18th, 2023 at 5:56pm by Tim@Visual Micro »  
Back to top
IP Logged
 
cortexian
Newbies
*
Offline


Posts: 3
Joined: Aug 17th, 2023
Re: Files are not saved before building
Reply #2 - Aug 19th, 2023 at 1:29pm
Print Post  
Yes that resolved it.  Thanks for the quick response.
  
Back to top
 
IP Logged
 
Marmadoc100
Junior Member
**
Offline


Posts: 10
Location: Toronto
Joined: Dec 21st, 2021
Re: Files are not saved before building
Reply #3 - Sep 15th, 2023 at 1:59pm
Print Post  
I'm new to Visual Micro, and have the same problem.
Unfortunately I do not know what exactly means "close the solution" and where I can find .vs folder.
Can you explain.
Thx in advance
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Files are not saved before building
Reply #4 - Sep 15th, 2023 at 2:02pm
Print Post  
If you right click the very top node in the Solution explorer, you can then "Open in File Explorer".

Then you can close VS, and delete the .vs folder which will be in the folder opened in the above step.
  
Back to top
IP Logged
 
Marmadoc100
Junior Member
**
Offline


Posts: 10
Location: Toronto
Joined: Dec 21st, 2021
Re: Files are not saved before building
Reply #5 - Sep 15th, 2023 at 4:57pm
Print Post  
Thank You. I did what you suggested, but didn't solved this problem. I have to save entire project before uploading. Now instead of .vs folder new folder _vs was created.
Any suggestion?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Files are not saved before building
Reply #6 - Sep 15th, 2023 at 7:05pm
Print Post  
A _vm folder will always exist under each project. A solution (.sln) can contain multiple projects and often sits in its own folder. If you "opened existing arduino code" the .sln might exist alongside the project code simply because the directory structure already existed.

It is a core Visual Studio function to save the code. Please show a screen-shot of your ide with solution and project code visible.

  
Back to top
IP Logged
 
cortexian
Newbies
*
Offline


Posts: 3
Joined: Aug 17th, 2023
Re: Files are not saved before building
Reply #7 - Sep 16th, 2023 at 1:00pm
Print Post  
One item to note.  When you delete the .vs file expand reopen the project you need to set the build target to release.  By default it’s debug and you will get debug behaviors you might not want.

What I would do in your situation:

1. Make a copy of the project directory.
2. Delete everything in the directory except for source files you have created.   That includes subdirectories, Project files and solution file.
3.  Bring up Visual Studio as an empty project.
4. The visual micro menu select creat from existing.
5. Select the .ino file.
6.  Maybe select some missing libraries..

This is basically starting from scratch but you loose nothing.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Files are not saved before building
Reply #8 - Sep 16th, 2023 at 4:03pm
Print Post  
edit: I was wrong. It turns out Visual Micro has always forced save prior to build. The release early next week uses an alternative vs api to perform the save. For the past 10+ years vm has used DTE.Documents.SaveAll but the next release has changed to call the vs macro for File>SaveAll which is DTE.ExecuteCommand("File.SaveAll"). 

That will hopefully be reliable and we will report this to Microsoft.
« Last Edit: Sep 16th, 2023 at 4:36pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Marmadoc100
Junior Member
**
Offline


Posts: 10
Location: Toronto
Joined: Dec 21st, 2021
Re: Files are not saved before building
Reply #9 - Sep 17th, 2023 at 1:42pm
Print Post  
Thx for all your input. I will try - and let you know.
Thank you very much
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Files are not saved before building
Reply #10 - Sep 20th, 2023 at 11:19am
Print Post  
The latest release (23.0915.01) which is available from the top of the below board should resolve this issue:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint