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) "Toggle Hidden Files" does not work (Read 4729 times)
Richard Arndt
Junior Member
**
Offline


Posts: 25
Joined: May 3rd, 2014
"Toggle Hidden Files" does not work
Sep 1st, 2017 at 8:26pm
Print Post  
Using Windows 10, Visual Studio 2017, and latest version of Visual Micro... "Toggle Hidden Files" does not work and I get the following in the "Output" window:

Error during processing of the command. Please review or post the stack trace in the www.visualmicro.com forumA sub filter with name "src" already exists. (Visual.Micro.Visual.Studio.Arduino.Helper.StandardAddItemShowAllFiles)
System.ArgumentException: A sub filter with name "src" already exists.
   at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.AddBoardCoreToProject(Object oProject, Board oBoard, Boolean forceShowExtraFiles, String nickName, Boolean linkFiles, Boolean incLibFolder)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.ShowAllExtraFiles(Project oProject)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.ShowAllFilesToggle()
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.ExecCmd(String commandName)


I rely on this to show students how to find Arduino & Library source code and headers.  Snap shot of project folders is attached.

Rich
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Toggle Hidden Files" does not work
Reply #1 - Sep 1st, 2017 at 8:59pm
Print Post  
Hi,

Thanks for the info.

VS2017 has had some very nasty bugs in this area. It does seem to be better in latest update so do please make sure you have updated VS via tools>extensions and updates

The error suggests that VS2017 is telling Visual Micro that the "src" filter/folder does not exist which is why Visual Micro is attempting to create the folder.

We can see the "src" filter in your image. If you remove it and then click "toggle hidden files" does that cause the error again? If so that would be the same sort of issues I have experienced in earlier releases of VS2017. 

I don't fully trust the issue is resolved. After reporting it to Microsoft I gave them the source code of one of their own example extensions with 5 extra lines of code reproducing the problem. They said they could not replicate and asked if the issue is resolved in the latest release.

I made significant changes and tests to visual micro to try to work around the issue and actually have some un-working to do because the changes make vs2015 toggle run slowly. There will be a new update over the next week which should correct that.

It's possible to run both vs2015 and 2017 side by side so you could then drop back to vs2015 if Microsoft have not fixed the issue.

Sorry I can't be of more help. Between their clunky new extension install system and this issue I sometimes feel like I am going backwards  Smiley
« Last Edit: Sep 1st, 2017 at 9:00pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Richard Arndt
Junior Member
**
Offline


Posts: 25
Joined: May 3rd, 2014
Re: "Toggle Hidden Files" does not work
Reply #2 - Sep 1st, 2017 at 11:50pm
Print Post  
Hi Tim,

I saw there was 1 update for Visual Studio, and so I installed it.  I then deleted the "src" folder and re-tried the "Toggle Hidden Files".  Results are that the "src" folder was recreated, but Arduino and Library source was not populated within the folder:

Error during processing of the command. Please review or post the stack trace in the www.visualmicro.com forumObject reference not set to an instance of an object. (Visual.Micro.Visual.Studio.Arduino.Helper.StandardAddItemShowAllFiles)
System.NullReferenceException: Object reference not set to an instance of an object.
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.AddBoardCoreToProject(Object oProject, Board oBoard, Boolean forceShowExtraFiles, String nickName, Boolean linkFiles, Boolean incLibFolder)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.ShowAllExtraFiles(Project oProject)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.ShowAllFilesToggle()
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.ExecCmd(String commandName)

If there is a log of sorts I could provide to assist your dialog with Microsoft, let me know.  For some reason, my students are not complaining about this problem using 2017, I just can't put it up on projector during class.  My machine is a clean Windows 10 and VS2017 install about 1 month ago.  Like you, I don't like going backwards... eg VS2015... so I will live with this for now... and wish you the best in forging forward on this with MS.

Rich
« Last Edit: Sep 1st, 2017 at 11:52pm by Richard Arndt »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Toggle Hidden Files" does not work
Reply #3 - Sep 3rd, 2017 at 12:02am
Print Post  
I've spent some more time with this in Vs2017. I added some better messages if the vs2017 bug happens.

I couldn't reproduce for a long time then suddenly I had the or similar problem with a couple of projects. I was stuck with an "src" folder and even if I deleted it manually the toggle could not recreate it fully.

I couldn't fix it by editing any of the actual project files. It appeared to be some visual studio corruption in it's temporary files. 

The solution was to close the project, delete the ".vcxproj", ".vcxflter", ".vcxuser", then use "file>open>arduino project" to reopen the .ino. Visual Micro will create new project files and then the toggle should work.

Please try the latest update along with deleting or moving the files mentioned.

Thanks
  
Back to top
WWW  
IP Logged
 
Richard Arndt
Junior Member
**
Offline


Posts: 25
Joined: May 3rd, 2014
Re: "Toggle Hidden Files" does not work
Reply #4 - Sep 3rd, 2017 at 2:17am
Print Post  
Your suggestion worked!  One thing I should expound on... I use one solution with 20+ projects.  For some reason, all of them stopped working at the same time a little while ago... it may have been an update of sorts that caused it, I don't know.  The method you suggested did fixed the one project I tested within my solution, leaving the other projects unchanged.  So I can fix projects one by one as needed.  I appreciate you putting in the additional effort to identify this work-around, which provides what I need for the classroom. 

Thank you very much!

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Toggle Hidden Files" does not work
Reply #5 - Sep 3rd, 2017 at 6:55am
Print Post  
As a test can you try opening one of the failing projects in a new solution to see if it works. Maybe this is related to the son.
  
Back to top
WWW  
IP Logged
 
Richard Arndt
Junior Member
**
Offline


Posts: 25
Joined: May 3rd, 2014
Re: "Toggle Hidden Files" does not work
Reply #6 - Sep 3rd, 2017 at 5:13pm
Print Post  
Yes, creating a new solution and then adding an existing project to the new solution did enable the "Toggle Hidden Files" to work for that project.  I then re-opened the original solution with original project, and Toggle Hidden Files remained not working for that project.  Seems there is something not synced between solution/project files, which might help you figure this out.

This may be random info... but one project in my solution that was working... I changed the hardware board type from Adafruit UNO to Feather M0 Express, and then I could no longer enable hidden files.  I removed the project from solution, deleted the _vm directory, *.vcproj and *.vcxproj.filters files, then added existing project back it, and it worked again.
« Last Edit: Sep 3rd, 2017 at 5:22pm by Richard Arndt »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: "Toggle Hidden Files" does not work
Reply #7 - Sep 3rd, 2017 at 5:29pm
Print Post  
Great, yes very useful. It suggests the issue is with the solution file or it's hidden files that might update in background.

A solution (.sln) is the simplest of xml files and does not store anything related to a project.

I think that Microsoft have some new source control feature that is incorrectly caching virtual folders that have previously been removed from projects such as the "src" folder.

  • Can you please close the solution and then delete the ".vs" folder that will exist below the folder where the ".sln" is. 
  • The re-open and see if the issue is resolved for all projects.


Hopefully it is as easy as that.

If not then you will find that creating a new solution and using "File>add>existing project" is quicker and easier than delete the project files we discussed previously. 



fyi:

The issue can't be with the project files because you have proved the projects are fine. Hopefully I will find one more simple single project solution with the issue then I will zip and send it to Microsoft.
  
Back to top
WWW  
IP Logged
 
Richard Arndt
Junior Member
**
Offline


Posts: 25
Joined: May 3rd, 2014
Re: "Toggle Hidden Files" does not work
Reply #8 - Sep 3rd, 2017 at 5:48pm
Print Post  
Deleting the .vs folder had no affect, hidden files still did not work.  Creating new solution and adding existing projects enables hidden files to work.

Does it make any difference adding existing projects through right click of "Solution->Add->Existing" verses "vMicro->Open Existing" verse "File->Add->Existing"?  I usually do it through right click of "Solution..."
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint