# Convert and Copy Projects

## Convert Projects

In general, you can open projects created by older versions of Intel® Visual Fortran and use them directly. If the projects were created in older versions of Microsoft Visual Studio*, the solution file is converted first and then any non-Fortran projects it contains. Projects created in newer versions of Intel® Visual Fortran might not be usable in older versions.

Projects created in Compaq* Visual Fortran 6.0 or later can usually be converted to Intel® Visual Fortran as follows:

1. Open the Microsoft Visual Studio 6 workspace file (`.dsw`) in a newer version of Microsoft Visual Studio. The project is converted to the new format.
2. Right click on the solution and select Extract Compaq Visual Fortran Project Items. This option is available only if your installation of Microsoft Visual Studio includes Microsoft Visual C++ (MSVC).

Some general conversion principles apply:

- It is good practice to make a backup copy of the project before starting conversions.

- Intel® Fortran projects are created and built in a particular version of Microsoft Visual Studio. If you open the project in a later version, you will be prompted to convert the solution. Once converted, a solution cannot be used in its previous environment.

- Compaq Visual Fortran 6.x projects can be converted to Intel® Fortran projects in Microsoft Visual Studio 2017, 2019, or 2022 environments. Fortran-only projects are simpler to convert.

  ### Note

  Support for Microsoft Visual Studio 2017 is deprecated as of the Intel® oneAPI 2022.1 release, and will be removed in a future release.

- Project conversion support is provided for Compaq Visual Fortran Version 6.x only. Compaq Visual Fortran projects created with earlier versions may not convert correctly.

- Fortran source files, resource files, and MIDL files lose any custom build step information when converted from Compaq Visual Fortran to Intel® Fortran. For other file types, custom build steps are propagated during the project's conversion.

- Conversion of Fortran and C/C++ mixed language projects results in the creation of two separate projects (a Fortran project and a C/C++ project) in a single solution.

- Intel® Fortran projects that are created with a point release (for instance, 2022.x) are typically backward compatible to the first release of that number (in this case, 2022.0). Projects are not backward-compatible between major release numbers.

## Copy Projects

You need to follow certain procedures to move a project's location if you copy a project to:

- Another disk or directory location on the same system.
- Another system where the Intel® Fortran Compiler is installed.

If you upgrade your operating system version on your current system, you should delete the *.SUO and *.NCB files in each main project directory before you open solutions with the new operating system.

It is good practice to clean a solution before moving and copying project files. To do this, select Clean in the Build menu.

## Copy an Existing Intel® Fortran Project to Another Disk or System

1. Copy all project files to the new location. You do not need to copy the subdirectories created for each configuration. Keep the directory hierarchy intact by copying the entire project tree to the new computer. For example, if a project resides in the folder \MyProjects\Projapp on one computer, you can copy the contents of that directory, and all subdirectories, to the \MyProjects\Projapp directory on another computer.
2. Delete the following files from the main directory at the new location. These files are disk- and computer-specific and should not be retained:
   - *.SUO files
   - *.NCB files (if present)
3. If you copied the subdirectories associated with each configuration (for example, Debug and Release), delete the contents of subdirectories at the new location. The files contained in these subdirectories are disk- and computer-specific files and should not be retained. For example, Intel® Fortran module (.MOD) files contained in these subdirectories should be recreated by the compiler, especially if a newer version of Intel® Fortran has been installed.

   ### Note

   The internal structure of module files can change between Intel® Fortran releases.

   If you copied the project files to the same system or a system running the same platform and major Intel® Fortran version, do the following steps to remove most or all of the files in the configuration subdirectory:

   1. Open the appropriate solution. In the File menu, either select Open Solution or select Recent Solutions. If you use Open Solution, select the appropriate .SLN file.
   2. Select Clean in the Build menu.
   3. Repeat the previous two steps for other configurations whose subdirectories have been copied.
4. If possible, after copying a project, verify that you can open the project at its new location using the same Fortran version that it was created in. This ensures that the project has been moved successfully and minimizes the chance of conversion problems. If you open the project with a later version of Fortran, the project will be converted and you will not be able to convert the project back. For this reason, making an archive copy of the project files before you start is recommended.
5. View the existing configurations. To view the existing configurations associated with the project, open the solution and view available configurations using the drop-down box at the top of the screen.
6. Check and reset project options.

   Because not all settings are transportable across different disks and systems, you should verify your project settings on the new platform. To verify your project settings:

   1. From the Project menu, choose Properties. The Project Property Pages dialog box appears.
   2. Configure settings as desired. Pay special attention to the following items:
      - General: Review the directories for intermediate and output files. If you moved the project to a different system, be aware that any absolute directory paths (such as C:\TEMP or \Myproj\TEMP) will most likely need to be changed. Instead, use relative path directory names (without a leading back slash), such as Debug
      - Custom Build Step: Review for any custom commands that might change between platforms.
      - Pre-build, Pre-link, and Post-build Steps in Build Events: Review for any custom commands that may have changed.
7. Check your source code for directory paths referenced in INCLUDE or similar statements. Microsoft Visual Studio* provides a multi-file search capability called Find in Files, available from the Edit menu.

Parent topic: Use Microsoft Visual Studio