Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Visual Studio Version Selector

gib
New Contributor II
3,645 Views

I have an irritating issue with Visual Studio.  I have two versions installed, VS2012 and VS2019.  Intel Parallel Studio XE 2019 Update 4 is installed in VS2019.  VS2012 does not have Fortran.

If I open a Fortran project by double-clicking on the .sln file, it opens VS2019.  If instead I click "Open with" I see VS2019 in the list of possible apps.  This is all OK.

If I try to open the project by double-clicking on the .vfproj file, it opens VS2012.  When I try "Open with", the only option is MSVS Version Selector, and it opens VS2012.

Not knowing how the Version Selector works, I thought maybe the .sln and .vproj files might contain the version number.

Here are the first lines of the .sln file:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31112.23
MinimumVisualStudioVersion = 10.0.40219.1

and here are the first lines of the .vfproj file:

<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject ProjectType="typeDynamicLibrary" ProjectCreator="Intel Fortran" Keyword="Dll" Version="11.0" ProjectIdGuid="{D1E40383-A1F8-417A-B689-48F1BF78BBA0}">

This very confusing - I see references to versions 12.00, 16 and 11.  The project was originally created on another computer with VS2012, and the .vfproj file seems to remember that, although now it is being used with VS2019.  Can I edit the .vfproj file to make the Version Selector know to use VS2019?

(edit) I forgot to mention that I've been in the habit of clicking on the .vfproj file to open a project - this always worked.  Maybe I should have been opening the .sln file, and now I just need to change my habit.

Thanks.

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
3,627 Views

Yes, you should open the solution and not the project. You can, if you want, select Open With for a .vfproj, select the option to use a different program, and then select VS2019, checking the box to always use that. But opening the solution is better.

 

View solution in original post

0 Kudos
5 Replies
Steve_Lionel
Honored Contributor III
3,628 Views

Yes, you should open the solution and not the project. You can, if you want, select Open With for a .vfproj, select the option to use a different program, and then select VS2019, checking the box to always use that. But opening the solution is better.

 
0 Kudos
gib
New Contributor II
3,622 Views

Thanks Steve.  I have tried "Open with" then selecting another program, but no VS versions appear in the list, only VS Version Selector.  There is "Look for another app on this PC" but that requires one to browse and select a .exe, and I don't know what executable to select for a particular VS version.

What is the function of Version Selector, anyway?  It just seems to be a PITA.  From the name you might think it gives you the ability to select a version, but the opposite is true.  Typical MS.

0 Kudos
Steve_Lionel
Honored Contributor III
3,599 Views

The "Version Selector" seems to read the version info in the thing you're opening and look for the corresponding VS version. It has never worked well for me.

You are looking for devenv.exe in whichever version of VS you want. It will be in a Common7\IDE subfolder - for example, C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE

 
0 Kudos
gib
New Contributor II
3,580 Views

Thanks.  I think I once knew that.

Another way to access the options for opening programs is to right-click on the .sln or .vfproj and select Properties, where you can click the Change button next to "Opens with".

0 Kudos
JohnNichols
Valued Contributor III
3,570 Views

You could get rid of VS 2012 as it is really old and VS 2019 does everything that the old one does and some other things. 

Although the latest preview, has a new I am compiling bar across the middle of the screen that shows red or green flashing as it compiles, below the edit window - a bit annoying 

If you add a file to the project folder location it now adds it to the solution - really annoying as you need to get rid of duplicates

 

0 Kudos
Reply