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

Possible to customize the default Visual Fortran project?

Espen_M_
Beginner
604 Views

For most of my Visual Studio (2012) projects I want a certain folder tree structure ("filters" in VS) and some non-standard compiler options.

Is it possible to change the default created vfproj files; or, alternatively, create custom project types for "Console application" and "Library"?

0 Kudos
11 Replies
IanH
Honored Contributor II
604 Views

The file with the project settings (.vfproj) is just an xml file.  If you create a project that has the settings you want (but with no files) then you can always copy and rename the resulting vfproj every time you want to add a new project (use Add exiting item to add it to an existing solution).

I don't have VS2012, but on earlier versions at least (...or so I've heard...) the items that get deployed into a new project are maintained in .zip files (and there's a corresponding cache folder with unzipped files) in the VS program files directory under ...\Common7\IDE\ProjectTemplates\IntelFortran (replace ProjectTemplates with ProjectTemplatesCache to see the unzipped area - the heirarchy should be pretty self-explanatory).

A... ummm.... good friend of mine... once told me that he had some success copying and pasting selected settings from an existing project into the vfproj in the cache area so that all new projects from that point on picked up those settings.  I don't think the Intel support folk would have high regard for this individual's actions though.
 

0 Kudos
Espen_M_
Beginner
604 Views

Thanks!

0 Kudos
Steven_L_Intel1
Employee
604 Views

Just keep in mind that if you do as Ian's, um, friend, suggested, your changes will be wiped out when you next update Intel Fortran.

Back in the CVF days we had a feature to "save project environment" that would do this. Since MSVC nowadays has a general capability along these lines, we really should try to do the same for Fortran. I will suggest this as a feature request, if it's not already on the list.

0 Kudos
FortranFan
Honored Contributor II
604 Views

What the O.P. is really requesting is Visual Studio project template capability similar to what Microsoft offers in Visual Studio IDE for other Visual Studio projects such as C console application, C dynamic-link library, etc.

I'd posted a similar query a while ago and Steve's response was Intel had no plans to offer such a capability.  Steve, has anything changed since then to get such a feature on the development list?  It'll be very nice indeed!

In the mean time, I'm doing something along the lines of Ian's friend (hmmm...!) i.e.,

  1. I keep a "template" folder in my Visual Studio folder (C:\users\xyz\My Documents\Visual Studio ...) which has all my Fortran settings for various projects such as Fortran static library, DLL, console app, etc.
  2. When I need to create a new Fortran project, I first create a blank Fortran project using the appropriate Intel's templates in Visual Studio.
  3. I then close the newly created solution in VS,
  4. Then manually replace and edit the newly created solution (.sln) and project (.vfproj) files with my saved ones.  As Ian mentioned, these are XML files that can be viewed and edited in any text editor.
  5. Then reopen the solution in VS and add new stuff as needed

This approach works for me in VS 2010, 2012, and 2013, but it'll be great if Intel offered the ability to create Fortran project templates.

 

 

0 Kudos
Steven_L_Intel1
Employee
604 Views

I submitted a feature request for this.

0 Kudos
dboggs
New Contributor I
604 Views

Have you tried the VS option Tools > Import and Export Settings? This can save a lot of custom settings but it's not clear to me if it will do what you need. Trial and error may be in order.

0 Kudos
Steven_L_Intel1
Employee
604 Views

No, that won't work - it's for general VS settings, not project properties.

0 Kudos
Grace_G_
Beginner
604 Views

Any update on this feature of reuseable Fortran project property? I use Intel Parallel Studio Cluster. 

0 Kudos
Kevin_D_Intel
Employee
604 Views

There is no update regarding the feature request. It remains open and has not been targeted for a future release at this time.

0 Kudos
Y_S_
Beginner
604 Views

I have used Compaq Visual Fortran for many years and now is forced to change to Intel Fortran as my new computer has a window 10 system. Just installed Intel Fortran to my computer and found that Intel Fortran cannot debug my fortran file. What I did was this

1. Click 'File'+ 'New'+ 'Project'+'Intel (R) Visual Fortran'+'Console Application'+'Main Program Code'. This opens a ready-to-use file Console1.f90

2. Click 'Debug'+'Start Debug' . I then sae a box says "This project is out of date. Would you like to build it?" I then click 'Yes'.

3. A new window opens with 'There were build errors. Would you like to continue and run the last successful build?'  I then click 'Yes'.

4. A new window opens with 'Unable to start program'.

Could anyone help me out? Going through many online searches and reading many documents, i could not figure out what is going on. Thank you very much for your time.

Yiguo

0 Kudos
Steve_Lionel
Honored Contributor III
604 Views

It sounds as if there was no previously successful build. What is in the build output window when you build the solution?

0 Kudos
Reply