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

Visual Studio 2022 and Intel Fortran 2022.2 debugging and workaround - Now working!

van_der_merwe__ben
New Contributor I
1,541 Views

We have a large solution which includes many native Visual C++, Intel Classic Fortran, .NET and other projects.

On a CLEAN up to date Windows 11 machine:

- Installed Visual Studio 2022, version 17.3.5

- Installed Intel Fortran using w_fortran-compiler_p_2022.2.0.9570_offline.exe.

There were no installation issues. The solution opened fine and compiled fine, including Fortran projects.  However, when debugging Fortran code, the call stack only showed the Fortran DLLs not the methods and most symbols in the code could not be inspected for a value.

So we ran the Visual Studio installer from the Start menu and did a repair of Visual Studio 2022. It wanted to reboot.

Now you can see all Fortran symbols and debug information and call stack. YES

On a machine with lots of old compilers including Visual Studio 2022 and 2019 and Intel Fortran 2022.0.0:

- Updated Visual Studio 2022 to 17.3.5, if it was not there already.

- If you just run the Intel Fortran 2022.2 installer, you may get this: "Removal of component has failed. Component id: intel.oneapi.win.compilers-common.ide.common_vs2022, name: IDE Common for Visual Studio 2022, version 2022.0.0-161. Error: Sequence execution failed.". If you experience this, exit the Fortran installer and do this:

- Go to the folder C:\ProgramData\Microsoft\VisualStudio\Setup\x86\ and save your version of Microsoft.VisualStudio.Setup.Configuration.Native.dll and replace it with an older workaround one which you can find in these posts (attached below).

- Now run the Intel Fortran installer.  We used w_fortran-compiler_p_2022.2.0.9570_offline.exe. It will now successfully replace the Visual Studio 2022 integration and install fine.

- After installation, be sure to restore and switch back to your correct version of Microsoft.VisualStudio.Setup.Configuration.Native.dll.

- The solution will load and open Fortran projects etc. fine. However, if you debug Fortran code, you will not be able to see the Fortran call stack and most symbol values.

- Run the Visual Studio 2022 installer from the Start menu and did a repair of Visual Studio 2022. It will reboot.

- Now when you debug Fortran code you can see a full call stack and symbols. YES

Bottom line:

We have managed to get Visual Studio 2022 and Intel Fortran 2022.2 working fully on a six machines so far, using the above recipe developed by trial and error. It seems you need to use an older version of the native.dll (that work around is posted in these forums) and most importantly, do a repair of Visual Studio 2022 after installing Fortran 2022.2. Do not ask me why, but it fixes it.

1 Reply
van_der_merwe__ben
New Contributor I
1,540 Views

Here is the workaround dll we used. Be sure to save your version of C:\ProgramData\Microsoft\VisualStudio\Setup\x86\Microsoft.VisualStudio.Setup.Configuration.Native.dll.

0 Kudos
Reply