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
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.
Nested CodeAction
so all refactorings that require this feature are presented without grouping. You can track this issue under RIDER-74933VSCode
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:
Install MappingGenerator
nuget package (check the instruction for Rider users)
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.