I installed Visual Studio 2022. I then installed Intel OneAPI Base Toolkit followed by the HPC toolkit. Everything seems fine and I am able to create a Fortran project, but I am unable to run any code. When I write a code, the run bottom is greyed out (see attachment). I have read that I need to set up the Runtime library correctly but I don't think I know how to do that. For example, when I go to Project > Settings and scroll down to IFX Intel or IFortran Intel, I see "libraries" and I can change it but I don't know what to change it to.
-
We do not see any attachment. Be aware that Intel has a dedicated support forum and the response is often quite fast. – Vladimir F Героям слава Jun 23 '22 at 06:46
-
@VladimirFГероямслава thank you for the note. I have asked my question there but I think the issue lies with VS not Intel. I added the screenshot now. – MSHashim Jun 23 '22 at 12:15
-
That does not matter, you can ask about the integration to VS there without any worry. – Vladimir F Героям слава Jun 23 '22 at 12:59
-
And the compatibility issue is a pinned post there. – Vladimir F Героям слава Jun 23 '22 at 18:56
-
I am looking into Intel Fortran after a long absence. I also installed Visual Studio 2022, but both of the OneAPI installers only show me a blank white rectangle -- the base offline and online versions. – warrens Oct 17 '22 at 19:12
3 Answers
The problem is solved now. It turns out that it was a compatibility issue between VS 2022 2.0 version and Intel OneAPI. This lastest version of VS is incompatible with Intel OneAPI Fortran. There is a workaround to manually turn on the “Use the legacy native solution and build services". See details here:

- 71
- 1
- 6
-
1Which version of VS 2022 has solved this. Last time I tried with 17.2.4 it was still a problem. – John Alexiou Jun 23 '22 at 13:24
-
Please note that by doing the `UseLegacy` workaround, you will no longer be able to use the `Save-All` functionality in VS. There is however a temp fix at [the bottom of the post](https://community.intel.com/t5/Intel-Fortran-Compiler/Do-not-upgrade-VS-2022-to-version-v17-2-as-It-breaks-all/m-p/1382358/highlight/true#M161212) – John Alexiou Jun 23 '22 at 13:28
The following applies to a recent installation of Visual Studio 2019 with the Intel compiler via Intel Parallel Studio. It might apply for your problem with the more recent VS 2022 / Intel oneAPI, too:
In Visual Studio go to Help/About Microsoft Visual Studio
: Is the Intel compiler shown in the list?
If not, a reinstallation as described here may help, paying attention to this point:
Be sure to check the box Microsoft Visual Studio 2019 in the Integrate IDE step
A reinstallation in this way (done by the IT department of my company) fixed a similar issue to yours for me.

- 75
- 1
- 7
-
1Thanks, @marcus_a, see the answer I posted. It turns out that it was a compatibility issue, for which there luckily is a solution. – MSHashim Jun 23 '22 at 13:19
For the screenshot provided you do not have a Fortran project created. You are just looking at a source file on its own.
The project creation screen looks like this
and the loaded project should have files in the solution explorer (top-right pane below).
It is worth mentioning (like others have stated) that there is something broken in the VS integrations with VS2022 17.2.X.
- VS Community - Can't open existing fortran projects. Can't create new fortran projects.
- Intel Fortran Forum - Do not upgrade VS 2022 to version v17.2+ as It breaks all functionality for Intel Fortran
Possible remediations are as follows
Use a prior version of visual studio. I keep VS 2017 around for this reason, but VS2019 would work also. Even VS 2022 17.1.X works. If you have this then try it out to check if you can compile Fortran.
Install the patch mentioned in the Intel Forum post
Do the
UseLegacy
workaround option from the VS forum post, but for me this disabled theSave-All
functionality for some reason.
I am not aware of any other remediations at this point.

- 28,472
- 11
- 77
- 133