the selected file is not a valid solution file in microsoft visual studio 2012 - visual-studio-2012

I am using microsoft visual studio 2012, I double my solution file then get this error, I have tried by opening the file>Open>Project/Solution, then select the file name, but it still could not work and get the error as below:
the selected file is not a valid solution file

Try to open your .sln file.
most probably file may contain Null values or empty.
In my case it works after replacing .sln file with early backup .sln file.
Or try to get this file in TFS working version.
because it contain all your solution related data.
eg. VS version, class library details...

Related

How to change the Visual studio target path?

Unfortunately, I have copied and pasted one Program(Project) to a path. This project has been developed in Visual studio 2010. Now, this project is not executing. It prompts the target path. How can we change this target path?
You can open *.csproject file with any text or XML editor, change the wrong path, then save the file. Then re-open the project with Visual Studio 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 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.

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.

How to highlight occurrences of a search term in text in Visual Studio 11 / 2012?

How to highlight occurrences of a search term in text in Visual Studio 11 / 2012? There are solutions in VS 2010 and 2008, any one know of one for VS2012?
The fix mentioned in the solution is to download the SelectionHighlight.vsix file then.
Change the Extension to .zip
Open the zip file and edit the manifest file in a text editor.
Change the Visual Studio Version attribute to 11.
After saving the file back into the zip, change the extension back to .vsix
Just move forward with installing the file and you are set.
okay... just checked a plugin for VS2010 and they have a "Fix" for 2012. Check the Q and A here: http://visualstudiogallery.msdn.microsoft.com/4b92b6ad-f563-4705-8f7b-7f85ba3cc6bb

Resources