Create Solution Folder in Visual Studio Express 2013 - visual-studio-2010

I noticed that when you open a solution in VS 2013 Express which contains solution folders, they load properly and the solutions builds properly. Unlike the express versions of Visual Studio 2010 which showed error messages when the solution loaded.
Here's a screenshot of the AvalonDock solution which is open in Visual Studio 2013 Express:
Since Visual Studio 2013 Express can clearly use solution folders, my question is: How do you (if you can at all) create one?
Whether it is a straightforward way from inside Visual Studio or a "hacky" way (for example) of manipulating the .sln file.

To create a new solution folder in VS2013 Express...
Open your solution file in a text editor. Add the Project line to the top of the file. If you want to add more than one then you'll have to invent some new GUIDs.
Open in VS2013, you can now rename, drag/drop projects into it etc.
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "New Folder", "New Folder", " {765E7B51-3482-4523-AE2F-6299401EDD0B}"
EndProject
.
.
.

Select Solution and press Ctrl+Shift+A. Then create text file. Text file will be placed at new folder "Solution Files",
Then delete text file and rename folder.
=)

Alternatively, the Visual Studio Express 2013 Web fully supports this. If you don't want to mess around with the solution file, you can open the solution using the Web version and add the folder from there.
I don't know why the Web version supports it but not the Desktop

Related

Open Visual Studio Solution file only in VS 2019

I was using .NET Core API project with 2.2 Framework in VS 2017. Now we have migrated all the .NET Core API Projects to 3.0 Framework.I have both VS 2017 and 2019 installed in my machine. When we click on ".sln" file it gets openend in VS 2017. But i want the .sln file to be openend in VS 2019.
Please let me know the changes required to achieve this.
Thanks
For one, you can delete the solution file and create a new one dotnet new sln.
Assuming you have .NET Core 3.0 sdk installed and active (in case of globa.json being present), it should create you an *.sln file for VS 2019.
Alternatively edit your sln and change the first few lines to
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29512.175
MinimumVisualStudioVersion = 10.0.40219.1
thats the sln header VS 2019.4 (16.4) creates on new solutions
Right-click on the .sln file
From the popup menu click on "Open with" and in the submenu click on "Choose another app"
In the splash window select "Microsoft Visual Studio Version Selector", don't forget to tick the "Always use this app to open .sln files" checkbox, and click "OK".
If prompted to save changes to the "devenv.sln" file, save changes.
In this way, a double click on a .sln should open it with the version of Visual Studio that was used to create it.
Open Visual Studio 2019 and select File-->Open than browse to the solution file that should be ported to VS2019 to open it.
After the solution file was successfully opened in VS2019, chose to Save All.
From now on, your solution file will be opened with VS2019 once you doubleclick solution file in file explorer.
P.S.
Editing solution file manually to update VS version is not recommended because it does not respect possible structural changes of the solution file that may appear between VS versions.
Or,
create a shortcut to the .sln file
right-click the shortcut, choose Properties, General
Opens with, click Change and select Visual Studio 2019
(note - this only changes the shortcut, not the .sln itself, but it's a quick safe fix)

Open visual studio project in its respective version instead of Visual Studio 2017

Ever since I installed Visual Studio 2017, it now wants to be the one to open all of my projects. Before installing 2017, if I double clicked a VS 2010 .csproj or .sln in Explorer (Windows 10), it would open in VS 2010. But now opening a project for all previous versions opens in 2017. Even if I right-click and choose Open With > Microsoft Visual Studio Version Selector it always chooses 2017. To open it in the correct version of Visual Studio, I have to first open VS and then browse to the project to open. This is a pain when I don't remember which version the project should open with and just want to click it and open it. Can I reset it to open a project in the version of visual studio it belongs with?
I confirmed how this is meant to work with the team. The only requirement is that you set Microsoft Visual Studio Version Selector as the Default App for .SLN files in Windows. That app launches the version of Visual Studio specified in the solution file. If you crack open a .sln file in an editor, you'll see a section that specifies the version of VS that should be used. It'll look something like this:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.25909.2
One thing to keep in mind though is that value will change whenever a different version of Visual Studio writes to the solution file. E.g., if you create a solution in VS 2010, close VS 2010, launch VS 2017, open the same solution, add a project to it (this is what forces VS to make a change to the .sln file), the version in the solution file will then change to VS 2017. I.e., the last version of VS to write to the solution file, will be set as the version to be used when opening it.
If you're finding it's not working as described, we likely have a bug here. Let me know if that's what you think is happening.

How to set Visual Studio 2015 as the default editor for older projects

Visual Studio 2015 is backwards compatible with 2013. As a result, it doesn't upgrade solution files that you open with 2015 at all.
Now, I recently installed Visual Studio 2013 and whenever I open a solution (.sln) file, it uses the Visual Studio Version selector to pick Visual Studio 2013 instead of 2015.
How can I configure the Visual Studio Version Selector to use the highest valid version instead of the specific version indicated without necessarily modifying the .sln file (discussed here: How to force a Solution file (SLN) to be opened in Visual Studio 2013?). I want to avoid breaking others who might not be using 2015 yet.
Even if you update .sln file to open with VS2015 by default, it will still work with VS2013. MinimumVisualStudioVersion parameter inside .sln will let users with VS2013 to open solution normally.
I prefer to update .sln files as described here.
Open solution you wish to upgrade in VS2015
Select the solution file in Solution Explorer
Select File / Save MySolution.sln As...
Overwrite the existing solution file.
Find your project(.sln file), right click and select "properties".
Under "General" option, click "Change" button behind "Opens with" item.
Select "VS2015" then click OK. Done~

How to open files with differnet application having the same extension

How does Windows determine the application to start when I double-click on an associated file?
I installed Visual Studio 2013 on my PC and converted an existing solution from version 2008 to 2013.
Interesting, when I double click on a solution in 2008 format it opens VS 2008, for a 2013 it opens VS 2013. That's fine but how does Windows know? All solution files have the same extension .sln, so there must be another way to define the opening application in this case.
The following texts from this post should address your concern:
When you double-click on a .sln file, a small program called vslauncher.exe is called with the path to your .sln file as its first argument. The job of vslauncher.exe is to read enough of your .sln file to determine which version of Visual Studio to use to open your file. Since you may have several versions of Visual Studio installed (VS2003, 2005, 2008, Express SKUs, etc.) you probably want to open the solution with the same copy of Visual Studio that you used to create it.
Visual Studio 2008 .sln files typically start with these two lines:
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
That said, if your .sln file signature (the first two lines of your file) does match any known release of Visual Studio, it will be opened by that particular VS version.

How to convert project from VS2012 to VS2013

Funny question but I stacked on it. I opened in VS2013 solution file which uses VS2012, but it still doesn't show me any screen for upgrade solution to VS2013. I mean I can open this project in VS 2013 and it works but solution file still shows that it use VS2012
According to this article some wizard should be shown, but it doesn't
http://msdn.microsoft.com/en-us/library/vstudio/ms185327(v=vs.100).aspx
Found the answer. We need to correct manually the Visual Studio sln file like this
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Open the project using VS2013, then go the the directory that the project is in and change the
extension of the Solution file (*.sln) to something like *.sln_12. Now save the project and a new sln file will be created.
Check this url http://visualstudiomagazine.com/articles/2013/06/12/vs-2013-can-load-vs-2012-and-vs-2010-projects.aspx. It supports round-tripping with older versions of visual studio so it doesn't upgrade solution/project file automatically.

Resources