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
Normal Topic Problem after openening a file with external program (Read 4439 times)
Jo Sto
Ex Member
*


Problem after openening a file with external program
Oct 13th, 2016 at 6:54am
Print Post  
Translated with google from German to English:
I have recently a problem, which some time ago was not there. I have included a file "todo.doc" and "data.xls" in my solution. This is opened in an external editor (Word, Textmaker, Utraedit). After that, I can not compile my project, there are massive errors.
If I then close the solution and re-open, everything is normal again, until I open again a file with external program.
Can someone give me a tip, from where the behavior comes?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem after openening a file with external program
Reply #1 - Oct 13th, 2016 at 11:21am
Print Post  
Not sure

Please switch on vMicro>compiler>verbose and also "show build properties"

Then click Build>rebuild

Then post the output as a .txt or email to info[at]visualmicro.com

Thanks
  
Back to top
IP Logged
 
Jo Sto
Ex Member
*


Re: Problem after openening a file with external program
Reply #2 - Oct 13th, 2016 at 12:42pm
Print Post  
Sent an email
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem after openening a file with external program
Reply #3 - Oct 13th, 2016 at 3:21pm
Print Post  
That's very interesting thank you.

We have another thread in this forum where the same error appears and now your report gives me more useful information.

The errors are because Visual Micro has stopped attempting to compile the project and you are seeing a standard Visual Studio C++ error with failed compile. 

The reason is not yet clear so I have some questions. 

1) Does the Visual Micro build button work correctly (not using Visual Studio Start Commands?

2) Can you please zip and email the project folder with all files and folders. (I will delete after I have looked at the file names and structure and will not look at the code)

Thanks very much
  
Back to top
IP Logged
 
Jo Sto
Ex Member
*


Re: Problem after openening a file with external program
Reply #4 - Oct 13th, 2016 at 4:45pm
Print Post  
Tim@Visual Micro wrote on Oct 13th, 2016 at 3:21pm:
1) Does the Visual Micro build button work correctly (not using Visual Studio Start Commands?

2) Can you please zip and email the project folder with all files and folders. (I will delete after I have looked at the file names and structure and will not look at the code)


The reason seems simple: after a file has been opened in an external editor, the selection in the Solution Explorer remains on this file. F7 then obviously does not translate the project but the selected file. The VisualMicro commands are then grayed out. I then have to click the project or solution, then everything works normally.
Conclusion: after opening a file with an external editor I have to click again on the project in the Solution Explorer, then it runs normally.

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem after openening a file with external program
Reply #5 - Oct 13th, 2016 at 5:18pm
Print Post  
Okay that's useful thanks.

There are a few combinations that Visual Micro has to consider when determining if arduino can override Visual Studios default behavior. 

With standard configuration these are the rules.

The build/upload commands on Visual micro tool bars and menus use the project associated to the active code editor.

The Visual Studio "Start" and "Build" commands work the way visual studio normally works to determine the "startup" project.

The solution explorer can be confusing. There is a "tools>options>solution explorer" "Track active item" that can be switched off for less confusion. Then the >> arrow above the solution explorer is used to synchronize the Solution explorer with the code editor.

We have to consider what happens when a C# and and and Arduino project (2 different types of projects) are open in the same solution. Then more of this will make sense (i hope)

  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint