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

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.

Related

Android studio only show blank files

I closed the emulator tab and all of a sudden no files can be viewed, except the first row of one .arb language file.
It doesn't matter what kind of file it is, it's not showing up and I can't write anything in the text window.
I quit android studio and restarted the computer but it still the same.
How can I fix this?
Close the project, then open it via file-> open... and select your root folder.
After that it works again!

Move solution in Source Control

I have a project under source control in Visual Studio 2012 using TFS2010. When I added this project, the solution was not added in the correct file folder location. I want to move the solution, but every time I try to do it within the Source Control Explorer I encounter an error: "The project file 'path/to/project.csproj' has been moved, renamed, or is not on your computer." What is causing this error? What is the proper way to move the solution to where I want it to be?
Move the solution file in TFS (this is more relevant if you have history you want to maintain)
Open the solution, it will complain that it can't load your projects, either edit the path to the project in the properties window, or remove each project and then re-add it. Check-in your changes
Delete the .suo file and try once. Has helped me in the past. This file is usually hidden. Restart VS after deleting.
The problem is the solution file has relative paths to the project files. I usually do any moving around when I first create the solution (before there are projects in it). However, in your case I would just use Source Control Explorer to move the solution, then edit the .sln file in a text editor and fix up the relative paths to the proj files.

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

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.

How do I disable the Performance Explorer from opening every time?

On a project that you've ran a Performance Analysis, the Performance Explorer tab always opens when VS is started, even if it was closed just before VS was exited.
How do I disable it and keep it from opening?
This is actually BUG since Visual Studio 2012 that's been open since summer 2012 with still no official MS fix.
Here's a workaround to this annoyance:
From Windows explorer, go under your VS project folder
Remove the following file types if present:
file.vsp - (VS Performance Report)
file.vsps - (VS Analyzed Reports)
file.psess - (VS Performance Session)
Re-open the Solution, if error, click OK (the Solution will still load)
Close the solution
Re-open the solution - the Performance Explorer tab will be finally gone!
#B. Clay Shannon - thanks for update to also delete *.vsps
In VS2015 Update 1 deleting the .psess file as per Leonel Gurdian's answer doesn't seem to work. Changing true to false in the following part of the .sln file did the trick though.
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
And it is still there in VS 2015 RC! You have to chose more options to start Performance Explorer but if it's once opened, it comes again each time you start IDE atleast when you open your project.
But deleting the psess-file in ProjectFolder still works.
Right-click on all items in 'performance explorer', choose 'Remove' and confirm the dialog boxes. After restarting Visual Studio, it will be gone

How to force Visual Studio not to add GlobalSection(Performance) section?

I played with Visual Studio builtin profiling tools and now every time I check out any file this section automatically adds to my solution file:
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
I totally removed all profiling reports, then removed local copy of all source control files from this solution and update to latest. This section still in *.sln file after any checkout.
Other teammates who haven't used prfiler doesn't have this problem.
Has anyone any ideas?
Open the PerformanceExplorer in Visual Studio by using the Menu Analyze -> Windows -> PerformanceExplorer and check if it lists any session entries.
If so delete them by doing a right-click on an entry to open the ContextMenu. Then select "Remove" from the menu.
You should also check the folder of your solution if it contains any .vsp or .psess files and delete them. These are the report files of a profiling session.
Only way I could solve this was to close the solution, delete *.psess and *.vsp files from the root directory, reset my .sln file to the remote version and reopen the solution. Problem was then gone. This was using Visual Studio 2015 Community Edition.

Resources