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

Copy an old vfproj or sln to a new project?

GWats1
New Contributor I
528 Views

Sorry for all the silly questions. I've got a Fortran project .sln in VS 2017 that I am happy with and want to preserve as is.  I wanted to start with that solution (.sln or .vfproj) and do a Save-As so I can add some more code (see my other posts) to read some input data.

 

I am very new to Visual Studio and how it organizes projects, so is there a way to keep my old solution and start a new solution with the same files? I probably need to save the F90 file I want to add on to as a new F90 file so I don't corrupt it.

 

I did poke around the File--> New--> Fortran Project from existing code and tried to do it but the F90 files must reside in different locations because some did not come over.  

 

TIA

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
519 Views

Maybe. By default, the paths to source files are relative to the project file (.vfproj), but it depends on how you added them. I just copy the whole folder - that's really all you should need to do.

View solution in original post

0 Kudos
4 Replies
Steve_Lionel
Honored Contributor III
520 Views

Maybe. By default, the paths to source files are relative to the project file (.vfproj), but it depends on how you added them. I just copy the whole folder - that's really all you should need to do.

0 Kudos
JohnNichols
Valued Contributor III
511 Views

if you zip the whole folder system from the level above the sln file 

unzip it it will create a second directory called  program(2) which is identical and works to the old one and then modify to your heart's content or the Tincup Whiskey runs out. 

it is an easy way to save a copy if you are about to do something dangerous like ski at Breckenridge in a snow storm, or code Intel Fortran. 

0 Kudos
andrew_4619
Honored Contributor II
508 Views

As Steve suggest I just copy the whole folder tree that has the project and files. Then you just open the project in the new folder. If you want to check there are no absolute file links in the 'new' project just rename the root folder for the original project on a temp basis. That way the new project will have errors if it is looking at any of the original files. 

 

0 Kudos
GWats1
New Contributor I
488 Views

Thanks for the tips. I think I got it going. My F90 and FOR files were spread out and I wanted to change the name of the one I was going to modify and change the name that the EXE inherits when it is compiled. I changed the name of the FOR and deleted the old one and added the new copy.  I made some changes to it and compiled and it ran my test data just fine.  So everything is up and going AFA VS 2017 is concerned.  Thanks for the tips.  I'm pretty unorganized when it comes to programming.     

0 Kudos
Reply