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) when loading project, files are not restored (Read 11237 times)
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
when loading project, files are not restored
Jan 2nd, 2016 at 8:45pm
Print Post  
Hi!
I've encountered a feature in VM plugin for Visual Studio, which didn't present some time before in earlier versions of VM. When I load a VS project, previously opened files are not restored (files that were opened in VS IDE when I have closed VS last time), so I need to open them again every time after I have loaded my project. The only file that is opened when loading project in VS - the main .ino file.

At first I thought it is VS problem, but seems not: regular VS project (MFC for example), when loaded, restores files that where opened in VS IDE. 

I use VS 2013.
« Last Edit: Jan 2nd, 2016 at 8:46pm by garrison »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: when loading project, files are not restored
Reply #1 - Jan 2nd, 2016 at 10:06pm
Print Post  
Hi, no that's not expected.

How do you open your visual micro projects? What do you click and what do you select/click OK to?
« Last Edit: Jan 2nd, 2016 at 10:07pm by Tim@Visual Micro »  
Back to top
IP Logged
 
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
Re: when loading project, files are not restored
Reply #2 - Jan 3rd, 2016 at 5:08am
Print Post  
I usually double-click a solution file that a VS creates for project. So there is no further select - it just opens.
Is there a way to setup VM plugin or VS itself to remember opened files so I don't need to setup them every time I open the VM project?
« Last Edit: Jan 3rd, 2016 at 5:37am by garrison »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: when loading project, files are not restored
Reply #3 - Jan 3rd, 2016 at 3:54pm
Print Post  
His, visual micro doesn't manage the opening. It's just a standard VS solution/project.

Are you clicking OK when prompted to save when you close the solution/project? That's when VS saves window states.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: when loading project, files are not restored
Reply #4 - Jan 3rd, 2016 at 4:07pm
Print Post  
Interesting. I just had happen what you describe. 

Normally I don't double click and run .sln files from windows explorer. I use the File menu in visual studio which has the recently used list, or use file>open etc.

The problem does seem related only to when the .sln file is run from outside of visual studio. Can you please confirm this to be the case? That it restores last opened documents when opening the solution from inside visual studio?

If you agree with these findings I can look into it some more.
  
Back to top
IP Logged
 
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
Re: when loading project, files are not restored
Reply #5 - Jan 3rd, 2016 at 5:27pm
Print Post  
I don't know what is happened - but now, when I tried to check again, it started to work properly: files are being restored regardless the opening method (from inside VS or outside it). Maybe that is because I have recently updated VS to latest update #5. The only thing that I found is that files are not restored if they opened from "External Dependencies" group in Solution Explorer tab (regardless the opening method).
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: when loading project, files are not restored
Reply #6 - Jan 3rd, 2016 at 5:40pm
Print Post  
Okay thanks for info. The answer to your remaining question is this is how VS works.

However you can click the project and then click the Project>Show Arduino Core and Library Sources" option. When you use the option Visual Micro will add/remove shortcuts to the underlying code directly into the project. Opening the sources from the shortcuts will save window positions when you restart the ide.

If you find some underlying sources show intellisense errors you can right click and remove them from the project. All of the shortcuts created in the place that visual micro creates them are ignored for compile, so they are to help you develop but are unimportant. There are other ways to control intellisense errors but they aren't worth discussion and are off topic Smiley
« Last Edit: Jan 3rd, 2016 at 5:40pm by Tim@Visual Micro »  
Back to top
IP Logged
 
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
Re: when loading project, files are not restored
Reply #7 - Jan 3rd, 2016 at 6:55pm
Print Post  
I appreciate your support. Thank you!  Smiley
  
Back to top
 
IP Logged
 
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
Re: when loading project, files are not restored
Reply #8 - Jan 4th, 2016 at 10:21am
Print Post  
Finally I've found a situation, in which opened files are not restored after VM project is opened. It depends on "Show Arduino Core and Library Sources" option. If it is not activated, files are not restored. If it is activated - they are restored, even if the files were opened NOT via shortcuts in Solution Explorer tree.
« Last Edit: Jan 4th, 2016 at 10:23am by garrison »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: when loading project, files are not restored
Reply #9 - Jan 4th, 2016 at 1:09pm
Print Post  
Are the files you want restored part of the project or external ad-hoc files that you have opened?
  
Back to top
IP Logged
 
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
Re: when loading project, files are not restored
Reply #10 - Jan 4th, 2016 at 1:16pm
Print Post  
Theese files are part of the project - custom libraries.
« Last Edit: Jan 4th, 2016 at 1:20pm by garrison »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: when loading project, files are not restored
Reply #11 - Jan 4th, 2016 at 1:28pm
Print Post  
What do you click to open the project/solution?
  
Back to top
IP Logged
 
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
Re: when loading project, files are not restored
Reply #12 - Jan 4th, 2016 at 1:58pm
Print Post  
I tried different ways:
- double-click to .sln file in explorer
- "Recent Projects and Solutions" menu item right in VS
- File>Open>etc from VS

The result is the same: files are restored only if "Show Arduino Core and Library Sources" option is enabled in menu.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: when loading project, files are not restored
Reply #13 - Jan 4th, 2016 at 3:49pm
Print Post  
Okay I test it all again thanks

It would help if you sent me your project just so i can see what is configured. If you can then zip the project folder and  email to info[at]visualmicro.com
  
Back to top
IP Logged
 
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
Re: when loading project, files are not restored
Reply #14 - Jan 6th, 2016 at 11:06am
Print Post  
I've sent the example project to email that you provided. This project uses my custrom libraries, so it will not be compiled without them. Do you need thees libraries?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: when loading project, files are not restored
Reply #15 - Jan 9th, 2016 at 6:31pm
Print Post  
Thanks for the example. I am confused.

1)
When I double clicked the .sln of your example the project opened and, as reported, no source code was opened/restored

2)
I then opened the .ino source code and clicked the X to close the Ide. I was prompted to save changes to the "Solution" and I clicked OK/Yes.

3)
Then I double clicked the .sln again and the project opened and the .ino source code opened automatically.

.......

What other project types have you tried?. Another C++ project?

I am using VS2015 Update 1. I have no idea if Microsoft have fixed something in this area in Update 1 but we have an explained difference between our systems.

One thing I notice is that your projects are set to use a slightly older compiler for intellisense. New Visual Micro projects are now version independent. You can change the compiler version to v140 in the VS project properties. I don't think this has any relation to the auto open issue.
« Last Edit: Jan 9th, 2016 at 6:33pm by Tim@Visual Micro »  
Back to top
IP Logged
 
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
Re: when loading project, files are not restored
Reply #16 - Jan 10th, 2016 at 7:27am
Print Post  
Yes, it seems like this behaviour is VS version dependent.
Maybe older version that I use works not exactly as it should be. Maybe I'll try to use VS 2015. But anyway, thank you a lot for your superb support  Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: when loading project, files are not restored
Reply #17 - Jan 10th, 2016 at 4:41pm
Print Post  
Thanks. Which Ide version are you running?
  
Back to top
IP Logged
 
garrison
Junior Member
**
Offline


Posts: 28
Joined: Mar 27th, 2015
Re: when loading project, files are not restored
Reply #18 - Jan 13th, 2016 at 7:26pm
Print Post  
VS Ultimate 2013 Update 5
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint