Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

gmStudio detects the installed Visual Studio (VS) versions and allows you to select one of them for your projects.  There is also a default VS Version setting for each user that set sets the default VS Version when you create a new projectsproject.

However, sometimes support for the latest VS version lags behind what is implemented in gmStudio. 

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

...

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

1) Running the correct version of DevEnv and MSBuild when you want to open a project or solution in the IDE, and running the correct version of MSBuild when you want to run a build
2) Authoring VS project files with the correct ToolsVersion and FrameworkVersion.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 SetEnv.cmd for VS2022

SetEnv is used to to set the environment for command line operations and for launching DevEnv.  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 and there are many ways to deal with it.   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. This begins by   The first step is to Activate a copying the default file from the installation folder to in your project workspace .  The using the Setting form can help you do this.  For VS2022, the following changes were made to the project-specific copyNote 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 AssemblyInfo files, and various other .NET platform translation content not generated from legacy code. The VS version impacts a few details in   AuthorText includes logic to set details of the project file set through simple lookups in the gmSL code.  You may modify this 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.  AuthorText is part of the System Translation Configuration.   TThe following changes were made in AuthorText.gmsl to support VS2022:

The 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.