Installation

Visual Studio

Currently, Mapping Generator supports Visual Studio 2017, Visual Studio 2019, Visual Studio 2022. All features should be available when the extension is installed in the form of VSIX (Visual Studio Extension), which is the only recommended option. Using MappingGenerator from the nuget package results in limited functionality and doesn’t support premium features.

Download installer for Visual Studio 2017 and 2019

Download installer for Visual Studio 2022

Rider

For the Rider users, MappingGenerator is distributed in the form of nuget package. It can be installed in a regular way per project or you can install it for a group of projects by creating Directory.Build.props file under your root directory (for example in the directory where you keep all your repositories) with the following content:

<Project>
 <ItemGroup Condition="$(ProjectName) != 'restore'">
    <PackageReference Include="MappingGenerator" Version="2023.7.61" />
 </ItemGroup>
</Project>

However, this approach might not work for projects that already use Directory.Build.props file (msbuild stops traversing directory hierarchy when encounters first Directory.Build.props). In such a case, you can put that file in any location and declare environment variables CustomBeforeMicrosoftCommonProps with a value set to the path of that file.

You can read more about customizing builds with Directory.Build.props here.

MappingGenerator on nuget

IMPORTANT: Before you decide to buy license as a JetBrains Rider user

  • MappingGenerator Pro works with JetBrains Rider only on the Windows OS platform.
  • Before you decide to buy the license, please install MappingGenerator and verify if UI CONFIGURATOR can be launched correctly. In case of any issues please report them via Issue tracker or you can try to reach me directly via the Contact form
  • Rider doesn’t support Nested CodeAction so all refactorings that require this feature are presented without grouping. You can track this issue under RIDER-74933
  • After 30s from opening refactoring window (ex. Mapping Configurator UI), Rider cancels the refactoring operation in the background which prevents proper document update after closing refactoring window. To mitigate that issue, MappingGenerator enforces the update by directly overriding file content. There’s one downside of this approach - you cannot undo those changes. You can track this issue under RIDER-74946
  • Rider incorrectly passes info about selected code block to refactoring actions. Due to this issue refactorings that operate on selected code (Catch and Log exception and Wrap in logging scope) are unavailable. You can track this issue under RIDER-75115

VSCode

VSCode support for Roslyn extensions is quite complicated from the user’s perspective. It can load Analyzers and CodeFixes from the nuget package referenced by the project but the Refactorings need to be imported via a separated mechanism. This complication affects the installation process because MappingGenerator utilizes CodeFixes and Refactorings. To get access to the complete set of MappingGenerator features you need to perform the following steps:

  1. Install MappingGenerator nuget package (check the instruction for Rider users)

  2. Update your %USERPROFILE%/.omnisharp/omnisharp.json config file (create it if doesn’t exist) to reference \analyzers\dotnet\cs\ directory from MappingGenerator nuget package installation folder:

    {
       "RoslynExtensionsOptions": {
          "LocationPaths": [
                "c:/Users/Cezar/.nuget/packages/mappinggenerator/2021.6.18/analyzers/dotnet/cs"
          ]
       }
    }
    

After updating MappingGenerator package version, you need to remember to update nuget package path in omnisharp.json file.