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

Stepping into IVF code from Visual Studio code (C#)

Intel_C_Intel
Employee
989 Views

Hi all,

About 6 months ago I downloaded an example from this site that showed how torun a fortran dll fromC# (visual studio). Helped me greatly.

When I ran it I was able to set a breakpoint in the IVF code and then step through the code. It was so cool.

At the time I looked all around at the differences between that app and mine and could never find the answer. Now I can't find the example. :-(

Does anyone know how to setup Visual Studio so you can step in to the IVF code?

I appreciate the help.

Eric

0 Kudos
9 Replies
Steven_L_Intel1
Employee
989 Views
In the managed code project (C#) properties, select Debug and check the box to enable debugging of unmanaged code.
0 Kudos
aggiedad
Beginner
989 Views

Hi Steve,

Thanks for the response.

I don't have an "enable debugging of unmanaged code" check box. I click on the C# project, then right click and select debug, I get two selections 1)Start new instance and 2) Step into new instance.

Am I missing a patch for Visual Studio?

Thanks again,

Eric

0 Kudos
Steven_L_Intel1
Employee
989 Views
You missed that I said "properties". Right click on the C# project and then select Properties. Open the Configuration Properties..Debug property page and select the option. See attached screenshot.
0 Kudos
aggiedad
Beginner
989 Views

My bad... thanks.

When I change that parameter and ran the application I get the error "Error while trying to run project. Unable to start debugging."... "The server threw an exception".

Have you seen that error before? Or do I have something out of wack in the code?

thanks,

Eric

0 Kudos
Steven_L_Intel1
Employee
989 Views
Ugh.. Yes, I have seen it before. I have no idea what causes it, but I can usually fix it by:

1. Uninstalling the Intel Fortran VS integration
2. Doing a "reinstall/repair" of Visual Studio (from add/.remove programs, change/modify)
3. Reinstall Intel Fortran VS integration
0 Kudos
aggiedad
Beginner
989 Views

Ugh... is not the word I used. I am now unable to build my project

I did items 1 and 2. But when I went to install the integration I got the following error.


You have a previously integrated Compiler with Visual Studio. The previous version must be uninstalled prior to install this one.

So I uninstalled all installed partsof fortran and reinstalled them, same error.

So I uninstalled all installed partsof fortran and reinstalled Repaired VS and then installed all fortran. Everything installed except VS integretedThe button is marked as "Install" (instead of Modify)

Appreciate any thoughts on where I can go from here.

Eric

0 Kudos
Steven_L_Intel1
Employee
989 Views
Submit an issue to Intel Premier Support - they can tell you the steps to manually resolve this. I'm out of the office and don't have access to the information.
0 Kudos
aggiedad
Beginner
989 Views

Will do... Thanks for your help.

Eric

0 Kudos
aggiedad
Beginner
989 Views

Update... The problem I had appears to be with IVF 8.1 that was also installed. I am not sure why or how IVF 8.1 was installed but maybe I upgraded to 9.

I uninstalled everything for IVF9 and the Fortran Compiler Integration would not install again. Once I unistalled IVF 8.1 then the install worked.

Eric

0 Kudos
Reply