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....
  • 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
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Build problems after update to most recent VM (Read 741 times)
frugal
Junior Member
**
Offline



Posts: 15
Build problems after update to most recent VM
Jun 9th, 2021 at 4:29pm
 
Hi,

I am experiencing some strange behavior with VM after upgrading from 2021.106 (I think; from memory) to 2021.6060.0.
After the upgrade I cloned an existing project to create a new version.
The new version compiled fine once.
After making a couple of tiny changes, I compiled again and got a Segmentation Fault error - for a library unrelated to the change.
Closed and reopened VM solution - no change.
Closed VM and rebooted - Now the project isn't recognized as an Arduino project by VS - there are no build options on the ribbon.
I see the same behavior for the previous working version - ie no build options on the ribbon.
If I create a new Arduino project, the build options appear - but disappear when I switch back to the an existing project.

File names of the folder, project and .ino file are all the same.

Any suggestions would be much appreciated.

Thomas
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 980
Re: Build problems after update to most recent VM
Reply #1 - Jun 9th, 2021 at 4:51pm
 
Thanks for the report.

Would it be possible to send us the whole project as a ZIP via email (sales@visualmicro.com), or attach it here so we can investigate further?
Back to top
 
 
IP Logged
 
frugal
Junior Member
**
Offline



Posts: 15
Re: Build problems after update to most recent VM
Reply #2 - Jun 9th, 2021 at 5:25pm
 
Many thanks for quick response.

Project zipped and sent.
Email subject line is the same as this one.

Best

Thomas
Back to top
 
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline



Posts: 11114
United Kingdom
Re: Build problems after update to most recent VM
Reply #3 - Jun 9th, 2021 at 5:58pm
 
Thanks, please also provide the info requested in the yellow box near the top of the page so we can replicate.
Back to top
 

Tim Leek
home
WWW  
IP Logged
 
frugal
Junior Member
**
Offline



Posts: 15
Re: Build problems after update to most recent VM
Reply #4 - Jun 9th, 2021 at 6:12pm
 
Therein lies the problem. Verbose and Show Build Properties are both checked, but there is no Compile button on the ribbon as the project is no longer recognized as an Arduino project by VM. See screen shot attached.

I just checked this again on another machine with the (an) older version of VM (2.21.106.19330). The known working previous version (306) of the project opens and compiles. The new cloned version (307) of the project that I emailed to you, opens, is recognized and can be compiled but throws the same Segmentation Fault error.
So something is off with the cloned version that I emailed to you.

This does not explain why neither old nor new project is recognized / can be compiled by the up to date install of VM on the machine I am having the issue with.

Many thanks
Back to top
 

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



Posts: 980
Re: Build problems after update to most recent VM
Reply #5 - Jun 9th, 2021 at 6:33pm
 
Just so we have as much information as possible to help investigate further:

Could we have a screenshot showing the solution explorer on the v307?

Does switching the build configuration from x64 to Win32, or x86 on the broken v307 help?

Is the C++ Workload still installed? (Tools > Get Tools and Features)

Could you send a screenshot from Build > Configuration Manager on v307?

Also please attach the output from Help > About > Copy Info.
Back to top
 
 
IP Logged
 
frugal
Junior Member
**
Offline



Posts: 15
Re: Build problems after update to most recent VM
Reply #6 - Jun 9th, 2021 at 7:02pm
 
Now I'm even more confused. I have changed nothing other than to open up VM on the other machine and attempted to compile.

When I created a test project before in the same solution it would have the complete ribbon. However, if I reopen the test project after restarting VS, the ribbon options are no longer there.
So I created a second test project [vMicro> New Arduino Project] and that makes the ribbon appear. AND this time, it stays there when I switch back to my projects 307 or 306. AND 307 compiles correctly.

This is repeatable. After restarting VS, the ribbon is gone again and only comes back if I create a new project. AND  307 still compiles.

In answer to your other questions:

Switching the build configuration to x86 (Win32 is not available) does not have any effect.

Get Tools and Features requires an update to the VS Installer before I can proceed. I will not do this yet.
Back to top
 
 
IP Logged
 
frugal
Junior Member
**
Offline



Posts: 15
Re: Build problems after update to most recent VM
Reply #7 - Jun 9th, 2021 at 7:03pm
 
Screenshot of v307
Back to top
 

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



Posts: 15
Re: Build problems after update to most recent VM
Reply #8 - Jun 9th, 2021 at 7:04pm
 
Config manager 1/3

Back to top
 

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



Posts: 15
Re: Build problems after update to most recent VM
Reply #9 - Jun 9th, 2021 at 7:04pm
 
Config Manager 2/3 & 3/3
Back to top
 

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



Posts: 15
Re: Build problems after update to most recent VM
Reply #10 - Jun 9th, 2021 at 7:05pm
 
VS Help > About

Back to top
 

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



Posts: 11114
United Kingdom
Re: Build problems after update to most recent VM
Reply #11 - Jun 9th, 2021 at 7:23pm
 
Is the "vMicro>General>Active Code Has Priority Over Solution Explorer" On or Off? The default is On

It will help if your screen shots include the solution explorer
Back to top
« Last Edit: Jun 9th, 2021 at 7:25pm by Tim@Visual Micro »  

Tim Leek
home
WWW  
IP Logged
 
frugal
Junior Member
**
Offline



Posts: 15
Re: Build problems after update to most recent VM
Reply #12 - Jun 9th, 2021 at 7:28pm
 
Active Code HAS Priority Over Solution Explorer is checked.

What I said before is incorrect. My mistake.
Creating a new project does not solve the issue, even temporarily. Test projects (only those created since VS was last restarted?), when selected in the solution explorer, cause the ribbon to display and can be compiled. The ribbon disappears when either 306 or 307 are selected in the Solution Explorer.
Back to top
 
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline



Posts: 11114
United Kingdom
Re: Build problems after update to most recent VM
Reply #13 - Jun 9th, 2021 at 8:27pm
 
If you open the 306 project in its own solution do things work okay? To do this close the current solution, then click File>Open>project/Solution, navigate to the project folder and open the project (vcxproj) not the solution.

Then show screen shot of the IDE with the solution explorer visible.

Thanks
Back to top
« Last Edit: Jun 9th, 2021 at 8:28pm by Tim@Visual Micro »  

Tim Leek
home
WWW  
IP Logged
 
frugal
Junior Member
**
Offline



Posts: 15
Re: Build problems after update to most recent VM
Reply #14 - Jun 9th, 2021 at 8:29pm
 
I had had a similar idea and just tested this:

Using the OLD version of VM (2.21.106.19330) I created a new Solution and added only the previous working project version (306) to it.
I then cloned the project:
  File > New > Project > Arduino Project
  Copy files from old project folder to the new project folder in Windows
  Add copied files to the project: Solution Explorer > Add Existing Item
  Copy code from previous Main to new Main.

I then created a new Solution on the machine with the up-to-date VM install and added the newly cloned project to that Solution.

Both Solutions + Project now seem to be working correctly on both machines though this has not been extensively tested.

I notice that the Solution Platform is now x86 on both installs. This was not the case before - the up-to-date VM machine showed x64.
Back to top
 
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline



Posts: 11114
United Kingdom
Re: Build problems after update to most recent VM
Reply #15 - Jun 9th, 2021 at 8:33pm
 
Hi

Thanks, this means the x64 is not associated to the Microsoft C++ compiler. You can use the drop down list on the toolbar to select x86/Win32.

I suspect the solution has been used for multiple different project platforms and is confused about the x64 settings. It isn't something Visual Micro controls.

Is there a reason for having all your projects in a single solution?
Back to top
 

Tim Leek
home
WWW  
IP Logged
 
frugal
Junior Member
**
Offline



Posts: 15
Re: Build problems after update to most recent VM
Reply #16 - Jun 9th, 2021 at 8:43pm
 
... and yes, opening the Projects in their own Solutions in VM 2021.606.0 also works correctly. So, as you suggest, this seems to point to some problem with the previous Solution File (which admittedly had a lot of baggage).

I kept some recent versions and R&D code in the same Solution for convenience. It had not been an issue until now.

I think that this is due to accessing the same Solution file from two machines - home and office...

I have been storing code in the cloud and compiling in both places. I realize that this is what GIT is for, but I didn't think it was necessary. Am I wrong?

Back to top
 
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline



Posts: 11114
United Kingdom
Re: Build problems after update to most recent VM
Reply #17 - Jun 9th, 2021 at 8:51pm
 
I don't really know you exact setup but this is more a question for Microsoft. We simply ask Visual Studio if the current project we are looking at supports the ClCompile tool. That's the Microsft C++ tool that is associated with std. C++ projects.

Is it possible that you added an x64 or other non C++ desktop project to the solution recently? That would cause a new platform to be added to the solution, in this case it was x64. If the projects in the solution do not have the x64 definition then I think VS becomes confused tells us there is no ClCompiler. Switch the solution back to x86 using the toolbar should have resolved.

Hopefully you believe this issue is easy to solve now that we know what the cause is?

Back to top
 

Tim Leek
home
WWW  
IP Logged
 
frugal
Junior Member
**
Offline



Posts: 15
Re: Build problems after update to most recent VM
Reply #18 - Jun 9th, 2021 at 8:59pm
 
I do not know whether or not the issue with the previous Solution was caused by the x64 Solution Platform. I did not (knowingly) add a x64/non C++ to the Solution - only the clone of the previous project made after updating VM.

I will repeat the cloning process on the of VM .606 and see if the problem reoccurs.

In any case, it seems that issue is resolved.

Many thanks for your help Smiley
Back to top
 
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline



Posts: 11114
United Kingdom
Re: Build problems after update to most recent VM
Reply #19 - Jun 9th, 2021 at 10:19pm
 
Thanks, we will look to see if we can detect the scenario and cater for it.
Back to top
 

Tim Leek
home
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print