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

VS 2022 v17.2.x breaks Intel Fortran, use v17.3.2 and newer

Ron_Green
Moderator
19,048 Views

Update 9 August 2022:

  The information, errors, workarounds are for older VS 2022 v17.2.x.  As of 9 August 2022 Visual Studio 2022 v17.3 was released which fixes this issue.

UPGRADE VS2022 to v17.3.0 or newer

 

OLDER 17.2.X INFORMATION

Symptoms:

  • ConsoleFortran.vfproj : error : Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.Shell.Interop.IVsUpdateSolutionEvents'
  • Project builds fail for existing and new Fortran projects.  
  • Debugger, multiple functions no longer work - breakpoints, examining variables, etc.

 

Affects:   Intel Fortran compiler Integrations into Visual Studio 2022 v17.2.x

Platforms:  Windows only .AND. VS 2022 v17.2.x only (not VS2019 or older).

  • Compilers:  IFORT and IFX versions in
    oneAPI 2022.2 ( ifx v2022.1.0 and ifort v2021.6.0 ) and OLDER
  • Any older Intel Fortran versions than those listed above running under Visual Studio 2022.
  • Does not affect any compilers in VS2019 and older Visual Studios

 

DETAILS:

Microsoft* Visual Studio 2022 (VS 2022) Version 17.2.x  do not work with our Intel Fortran Integrations into Visual Studio in oneAPI 2022.2 and older packages.  This VS version was released on May 10, 2022.  All newer versions of 17.2.x also impacted.  VS 2022 17.3.0 and newer fixes the issue.

Issue:  This update to VS 2022, the 17.2.x , breaks the Intel Fortran Integrations into Visual Studio.  VS 2022 only, not older versions.  IF YOU INSTALL 17.2 and you use packages from oneAPI 2022.2 or older YOU WILL:

  1. NO LONGER BE ABLE TO BUILD EXISTING FORTRAN PROJECTS.  IFORT or IFX
  2. NO LONGER BE ABLE TO CREATE NEW PROJECTS 
  3. Be unable to debug existing executables

 

Upgrade your VS 2022 to 17.3.0 or greater

 

57 Replies
Ron_Green
Moderator
2,306 Views

If you reinstalled VS 2022 17.2, and the C++ component - 

did you uninstall Intel Fortran and oneAPI before reinstalling?  If not, uninstall it now.

You will need to reinstall Intel Fortran AND THEN the patch kit.  The kit applies to an existing Intel Fortran Integrations to Visual Studio that is part of the compiler installation.  Once the compiler is installed again, then run the patch kit.

 

 

0 Kudos
stedwomas
Beginner
2,245 Views

Hi Ron i have reinstalled   VS 2022 17.2. 

Is there a link for the INTEL FORTAN ,or is it icluded in the oneAPI toolkit 

 

 

i assume the oneAPI is oneAPI toolkit v 2022.2  and after that I need the patch in this thread

 

best reagrds

steve

0 Kudos
Ron_Green
Moderator
2,237 Views

First, make sure you installed the C++ component for Visual Studio.  We need that.

You can install just the compiler, read THIS ARTICLE

Then, yes, apply the patch or the Microsoft workaround.

0 Kudos
stedwomas
Beginner
2,298 Views

This fix did not work for me - the fortran files loaded, BUT when i pressed build the program crashed out, with no way I can wind back to VS 2022 17.1 , it seems going to 2019 is the only option, any update on  a target date to solve all this 

0 Kudos
Ron_Green
Moderator
2,273 Views

No target date for the next update, no.  2019 is stable and recommended by many of the community members here.

0 Kudos
Scott_Begg
Beginner
1,951 Views

I just updated to the latest release of Visual Studio 2022, version 17.3.0, and it appears to fix the issue with Intel Fortran functionality and integration with Visual Studio. I had been using the UseLegacy workaround in the Microsoft.VisualStudio.FeatureFlags.pkgdef file but with the latest Visual Studio release I can set the UseLegacy setting back to its default setting.

0 Kudos
MJfort2
Beginner
1,856 Views

Microsoft indeed seems to indicate that the issue is fixed in VS2022 17.3:

https://developercommunity.visualstudio.com/t/Cant-open-existing-fortran-projects-Ca/10051432#T-N10052680 

For what it's worth, here is my experience with VS2022 17.3.1 (on Windows 10).

I have installed VS2022 17.3.1 with recommended options for Intel Fortran integration, and then the Fortran compiler (using the 2022.2 oneAPI toolkits).  I have not applied any of the workarounds mentioned here or in the Microsoft discussion, and this is a new machine (no previous Fortran or VS).

When I create a new project in VS2022, it doesn't seem to "know" that Fortran is there, so I can't apparently create a Fortran project, but if I open an existing solution with Fortran projects, I can build and debug them, the only missing feature is (again) that I can't seem to add a new Fortran project from the Solution itself. In Visual Studio's Help > About, Intel Fortran is installed with package ID w_oneAPI_2022.1.0.256 (and yes it's from the 2022.2 toolkit, go figure...). I have only tested this with basic projects so far.

 

 

0 Kudos
cean
New Contributor II
1,816 Views

I just installed VS2022 17.3.1 (on Windows 10) and Fortran (package ID w_oneAPI_2022.1.0.256).

I can create new Fortran project, but can't open old project.

0 Kudos
lszcz
Beginner
1,736 Views

How do we address this issue if we rely on vs_Community? Only the latest release is available in community edition -- I can't roll back.

0 Kudos
JohnNichols
Valued Contributor III
1,723 Views

Dual install 2019 and use that for the moment, you cannot tell the differences. 

0 Kudos
lszcz
Beginner
1,712 Views

Can you provide some more details, I do not understand? 

0 Kudos
johniou
Novice
1,681 Views
Even vs2017 community edition works fine with IFORT and it's more lightweight than vs2019 and allows temporary projects even for Fortran.
0 Kudos
lszcz
Beginner
1,680 Views

I would love to use vs2017 community edition but I do not see it available for download. The download page indicates that only the most current version will be available as a community download, therefore I do not have access to prior versions. Do you know where prior versions of community edition may be available?

0 Kudos
johniou
Novice
1,676 Views

You can download it from the older versions downloads, but you need an MS account.

 

https://stackoverflow.com/questions/55837625/how-to-download-visual-studio-community-edition-2017-not-2019

 

And the TechSpot download link:

https://www.techspot.com/downloads/6278-visual-studio.html

 

 

 

 

0 Kudos
Ron_Green
Moderator
1,698 Views

VS 17.3 fixes the issue.  problems are you seeing?

0 Kudos
lszcz
Beginner
1,697 Views

Ah, I am compiling with ifort and running into issues with ifconsol.lib, it is mapped but my compilation can't open it. I was hoping the issue might be related to the required patch? I am using VS Community with ifort from the HPCKit.

0 Kudos
Steve_Lionel
Honored Contributor III
1,655 Views

Please show the complete and exact error messages you are seeing.  It sounds unrelated to the VS2022 issues noted elsewhere.

 

Edit: Ah, I see you have provided some details in https://community.intel.com/t5/Intel-Fortran-Compiler/VS22-Community-edition-ifort-cannot-open-file-ifconsol-lib/td-p/1410769/  Let's take the discussion there.

0 Kudos
JohnNichols
Valued Contributor III
1,672 Views

Version 17.3.2 - just released works absolutely normally with Intel Fortran, running old Fortran projects and creating new ones that run.  

Version 17.4 the preview version does not recognize Fortran at all.  

0 Kudos
Ron_Green
Moderator
1,653 Views

try both a x64 64bit Configuation and ia32 Configuration.

What version of VS do you have?  Help -> About Visual Studio.  should be 17.3.x.  Not 17.4.  Not 17.2.x 

Intel Fortran latest download oneapi 2022.2, compiler 2v021.6

 

Start simple with a new project with a simple hello world.  get that to work.  don't start with an existing project from an older VS version.

0 Kudos
lszcz
Beginner
1,649 Views

Visual Studio Community Version 17.3.2!

I downloaded the most reacent intel fortran oneapi , when I click details on it, indicates product version 2021.6

 

when you say try the ia32 configuration, do you mean point all paths to the 32bit version -->

ifort --> C:\Program Files (x86)\Intel\oneAPI\compiler\2022.1.0\windows\bin\intel64_ia32

lib--> C:\Program Files (x86)\Intel\oneAPI\compiler\2022.1.0\windows\compiler\lib\ia32

 

I also notice that my lib folder has intel64 and intel64_win as well as ia32 and ia32_win. What are the _win folders?

0 Kudos
Ron_Green
Moderator
1,653 Views

working this in your other post.

0 Kudos
Reply