Visual Studio 2012 - Content Window Tabs Not Remembered on Re-Start of VS2012 - visual-studio-2012

My tabbed open documents are stuck on the same three files for over a month now. When I save and close VS2012 the open files I was working on do not come back on restart. I get the same three old files regardless. I am assuming that the tab cache has issues or something and needs to be cleared, but don't know where to go for this. Has anyone else run into this glitch? Any solutions to refresh the tab'able items so this functionality works correctly again?

It has been three weeks with no answers ... so I finally figured this out on my own. I hate answering my own questions, but here it is:
The SUO file is where all the settings, startup project, and cached user options are kept. With large projects there are times where the .suo file becomes corrupted or too large causing sluggish, or odd behavior with these options. Case in point the outlier I ran into with my open classes not being remembered.
Solution:
Simply delete the .suo file. Visual Studio will create a fresh one for you. I did this and it solved the problem.
NOTE: if you do not see a .suo file in your Solution's root directory try showing hidden files.

Related

Excel crashes when loading file that contains userform

Excel crashes when opening files that contain a userform
This is a known problem with a known solution workaround which is to delete a file called Excel.box from here:
C:\Users\SlowLearner\Application Data\Microsoft\Forms\Excel.box
According to this forum post the purpose of the Excel.box (& Word.box) file is:
Files such as Winword.box and Excel.box are associated with the
Control Toolbox you see when you are designing a UserForm in the
Visual Basic editor. The files contain information about the layout of
the Control Toolbox (additional tab pages, controls that have been
added or removed, custom icons, ...) If a user has never modified the
Control Toolbox in any way, there will probably be no .box file. By
deleting a .box file, you will restore the Control Toolbox to its
default (factory preset) configuration - this is the only way to do
that. Sometimes, the .box file becomes corrupted and must be deleted.
There are no negative side effects to deleting it.
Unfortunately Excel.box returns :(
It would seem that for most users the problem is fixed by deleting the file, sadly not for me.
I'd like to understand what is causing this problem to recur. A few points to note:
this (touch wood) is not impacting MS Word on my PC
I am using Office 2010, 64 bit version on Win10
I have not made any conscious change to form settings
if I delete the file > start Excel > UN-DELETE the file: everything works :-/
some other experiences with this issue here
For the time being I'll just check for and delete the file before launching Excel, but this is hardly an acceptable solution for the long term. Appreciate thoughts for a proper fix... TIA
Additional Information:
I have not fully explored the crash but so far it happens when:
starting the application by opening an xl?.m file with a userform
application does not get past the splash screen
crashes with the application's CRASH screen (... encounted an error...)
starting the application with a blank worksheet then adding a userform
crashes immediately with the applications CRASH screen displayed (see below)
The above crash happened after rebooting my PC, had a chance to explore it some more.
First I opened the file I had been working on (contains userforms):
annoyingly it opened without crashing
I did NOT enter the IDE
I closed the file (Excel closed normally)
Then I created a new worksheet
I opened the VBA IDE
right-click 'add UserForm' - Excel crashed immediately
(I aborted the recovery / search for a solution attempt)
Then I re-opened the file I had been working on
opened the VBA IDE (the project is PW protected)
the very instant that I entered the PW and hit enter Excel crashed
crash was same both times...
Safe Mode:
Crash still happens in safe mode - steps to reproduce:
Run: Excel /safe
Open VBA IDE
r-click add userform
crashes immediately
Creation of the EXCEL.box file
Based on visually observing the folder which had the Excel.box file I did some tests to try and see when it was created. Basically it seems to appear when one of the following happens:
- the UserForm tools box is closed
- the IDE is closed (after showing the userform)
I've also now tried to modify the userform toolbox by removing everything from it. Excel is still crashing after every restart of the application (which is odd as I was not able to crash it like that earlier).
Office Repair - not tested (yet)
Reluctant to try Office Repair as based on the following quote from here (scroll down: pg 1 reply 8 by Steve IT) I'm not expecting it to work :-/ (but will try if no other suggestions surface).
Thanks for the continued suggestions, however I have tried a repair and also removed Visual Studio 2013 and Office altogether (just in case VS was interfering) and reinstalled both, but it still throws the errors reported previously.
Other user profiles
Created a brand new user called 'test'. Test has the exact same problem.
This problem eventually resolved itself, not sure why. I continued to use Excel normally and it continued to crash so I would delete the offending .box file and start over...
As of Nov 2017 Excel no longer crashes with respect to this issue; my best guess is there was an automatic update that resolved the issue.
Looks like this issue still occurs and it is not just limited to Excel but also Powerpoint.
The fix as mentioned above works where you move / delete any files in the below folder location resolves the issue.
C:\Users\%username%\Application Data\Microsoft\Forms
It is highly likely that this error is caused by bad code in a macro or an Add-In that uses forms. The problem is replicating this can be difficult so you have to debug this in some way when it does crash out.
POWERPNT.box
EXCEL.box
are some of the files that get generated, where Excel or Powerpoint crash on the splash screen.
Try adding the command
ThisWorkbook.VBProject.VBComponents("UserForm").Activate
just before your
"UserForm".Show line.

Visual Studio 2012 constantly complaining that a file has been modified outside of the source editor

I am working on a parser, using the parser generator ANTLR in Visual Studio. Naturally, ANTLR is continually regenerating certain files. Every single time it does this, VS has a popup saying:
The file has been modified outside of the source editor.
Do you want to reload it?
The answer I want is always Yes to All.
Is there any way to tell Visual Studioto always assume I want to reload auto-generated files, without prompting?
Click Tools then options then under the environment node on the left choose documents then check the box that says Auto-load changes, if saved:
If you are using Visual Studio's internal editor and you know that nobody else is editing the file, you might be wondering why that happens. In my case, I realized I was working on a continuously backed-up network folder, that's why the file got re-saved every time I made a change on it and saved. So, if you can move your file to a local, not-backed-up folder, that might also solve this problem.

Visual Studio 2012 "Find in Files" searches far beyond the solution when "Entire Solution" is specified

While performing Find and Replace operations in Visual Studio 2012; using the Find in Files/Replace in Files dialog window, setting the "Look in" scope to "Entire Solution", and using Regular Expressions on all file types, Visual Studio is busy searching the WHOLE HARD DRIVE! Some of my searches take a very long time and when I look at the Visual Studio Status Bar, it shows the currently searched directory/file is something well outside of the solution folders - sometimes it is even searching the C:\Windows\System32 directory or similarly irrelevant locations.
Has anyone else seen this behavior? More importantly, does anyone have a solution to fix it, so my search and replace operations stick to the solution files and don't waste time searching the other million files on the computer?
I've not had it searching the whole drive, but I have had it return matches from files outside my project (this in VS 2010). In my case deleting the .suo file appeared to fix this issue.
My suspicion is that the files being searched are files I stepped into during a debugging session (or more accurately stepped out of my code into the calling code). Somehow these files are remembered and included in searches.
This wouldn't explain a full drive search, but could explain my "out of solution" results
I was having a similar problem with Visual Studio 2013 with Update 4 installed - in my case I was getting search results from files that had been in the Miscellaneous Files 'Project', even after removing them from Miscellaneous Files.
Deleting the .suo file from the solution directory solved the problem; however, doing so causes VS to forget which files you had open in the solution (and probably some other things).
Still occurring in Visual Studio Enterprise 2017, Version 15.8.6.
Deleting the .suo file (found in .\.vs\YourSolutionName\v15\) and rebuilding the solution fixed the issue.
I suspect it's known directory/targeted directory to search was being cached there because the Find Results would show up very quickly. Indicative of it not searching the "whole hard drive", or even my whole mapped workspace "Local Folder". Typically if I am performing a search on even a more parent branch in source control, it will take close to a minute.
For me the solution was to move the file .sln into the solution directory.

Visual Studio 2012 doesn't open previously opened file when after starting

This is the default behavior in VS2010. However, after I installed VS2012, I noticed it doesn't open those files I opened last time. Although in the Solution Explorer it remembers my last position, which projects are collapsed, but no file is opened in the editor area after I open the solution. I can't find such setting in opitons. Any help is appreciated!
Try deleting the .suo-file (same folder as .sln-File). May fix the problem. Make also sure that you have writing-permissions for .suo-file.

Monodevelop - when does it save csproj files?

When MonoDevelop crashes (somewhat often unfortunately) I usually have to re-do changes to the project that seem to not be written to disk. As a result my work flow has become - change project, restart monodevelop (hoping changes are saved during a close). I find this to be a little frustrating. Ideally there would be an explicit save button in the UI so that I know for a fact my changes are written when I expected them to be. I am not sure where to file enhancements requests - through Xamarin (since this is monodevelop with monotouch)? Any chance someone has written an Add-In to do this?
If everything is OK with your MD installation the Save All command/button should save all the project files and solution. I regularly use this command as a safeguard. On my experience just hitting Save only saves the file you are editing on the moment, keeping the solution and project files unsaved.

Resources