Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Overview

gmStudio detects the installed Visual Studio (VS) versions and allows you to select one of them for your projects.  There is also a default setting for the VS Version to use when you creating new projects. However, sometimes support for the latest VS version lags behind what is implemented in the gmStudio user interface, in that situation you may set the VS version according to the following process.

There are two points of integration between gmStudio with VS based on the DevEnv element:

1) Setting the environment before running the VS (devenv.exe) when you open the VS IDE do a build with MSBuild
2) Setting version specific content when authoring .NET project files

The details of the first integration are handled by a command script: SetEnv.cmd. The details of the second integration are handled by a gmSl script, authorText.gmsl. Both of these files may be modified to use an alternate version of Visual Studio.

Modifying the gmStudio project file

The VS version used by your gmStudio project is specified in the DevEnv element in the gmProj file:

<gmStudio>
  <Name>Calculator_csh</Name>
  <MigType>VBP</MigType>
  <DevEnv>VS2022</DevEnv> <-- set a name for the desired VS Version here
  <ProjFolder>C:\gmTestBed\Calculator\proj_csh</ProjFolder>
...
</gmStudio>

Modifying SetEnv.cmd for VS2022

Microsoft has used different conventions for setting up the VS command line environment over the years so it takes some wrangling to support the different versions.   gmStudio ships with a template file, SetEnv.cmd, to set the environment for command line build operations and for launching the VS IDE.  You may modify this file to support a version of VS not offered by the gmStudio IDE.  The first step is to Activate a copying the default file in your project workspace using the Setting form.  For VS2022, the following changes were made to the project-specific copy.   Note, VS2022 has finally made it into the 64-bit Program Files folder, rather than "Program Files(x86)" and that detail must be considered when selecting an environment setup script for the desired VS.

Modifying AuthorText.gmsl for VS2022

AuthorText.gmsl handles writing VS project files, AssemblyInfo files, and various other translation content not generated from legacy code.  AuthorText includes logic to set details of the project file based on the desired VS Version.  You may modify a project-specific copy of AuthorText.gms to support a version of VS not offered by the gmStudio IDE.  The following changes were made in AuthorText.gmsl to support VS2022:

AuthorText is part of the System Translation Configuration.   The process for using a modified AuthorText.gmsl is described in this article on Custom VB6 Language Replacement.   

Once these changes are made, gmStudio will integrate with VS2022.

  • No labels