This tool provides a standalone option to generate strongly typed entity classes for the Dataverse.
This tool essentially wraps up extensions to CrmSvcUtil.exe.
The great thing about this tool is that it is installed as an extension to run from the Tools menu of Visual Studio. It provides a UI where the user can select which Entities/Tables to generate Classes for. The user can select which Project the Classes should be created in. The user can also choose to create a separate class file for each class.
This tool uses the Microsoft XRM Tooling capability for authentication with Dynamics CRM, Dynamics 365 and the Dataverse. The tool works for on premise and online implementations.
This tool doesn't generate duplicate Enum definitions if the user chooses to create separate class files, like some other tools do. The tool also names the Classes and Enum definitions using the Display Name of the Entity or Attribute instead of the Schema Name or Logical Name, thus removing those annoying Publisher Prefixes and the underscores. This allows compliance with Microsoft Naming Conventions for Code Analysis. XML comments are also added wherever required and corrections are made to the generation of OptionSetValue Properties, as there are errors with the CrmSvcUtil.exe doing this out-of-the-box.
An OrganizationServiceContext instance is also created.
Visual Studio Versions
Please note that this tool only supports up to Visual Studio 2019 and there is a separate version of this tool specifically targeting Visual Studio 2022, available here: https://marketplace.visualstudio.com/items?itemName=JohanKustner.DataverseClassGeneratorVS2022.
The performance was improved in terms of creating an individual file for each type. I would have improved the performance even more if Microsoft's ENVDTE.dll worked properly. But unfortunately, the ProjectItems.AddFromDirectory method does not work correctly.
With version 1.2, an issue was corrected regarding the project name being used for the namespace instead of the project's default namespace.
With version 1.3, I updated the application to make use of the latest version 220.127.116.11 SDK assemblies, which allow for TLS 1.2 communication, as well as updating the target .NET Framework to 4.6.2.
Version 1.4 sees the use of the 18.104.22.168 SDK assemblies.
Version 1.5 sees the use of the 22.214.171.124 SDK assemblies and other updated assemblies.
Version 1.6 reverted back to .NET Framework 4.6.2 instead of 4.7.2 and reverted Microsoft.IdentityModel.Clients.ActiveDirectory back to version 2.22.302111727 due to a bug. Who knows when Microsoft will make the SDK work with later versions of Microsoft.IdentityModel.Clients.ActiveDirectory.
Version 1.7 identifies that, even though .NET Framework 4.6.2 is used, the following statement is required for older versions of Windows: ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
Version 1.8: an option has been included to specify explicit parameters to override the Microsoft.Xrm.Tooling.CrmConnectControl inputs.
The Microsoft XRM Tooling WPF Component was removed and replaced by custom capability. Also upgraded to .NET Framework 4.7.2 and to use version 126.96.36.199 of the SDK assemblies.
Updated to use version 188.8.131.52 of the SDK assemblies.
Updated NuGet packages to the latest versions.
Include support for Visual Studio 2015, Visual Studio 2017 and Visual Studio 2019.
Bug fixes regarding prerequisites.
Fixed a bug with online password disappearing.
Fixed a bug with MPF Dependency.
Fixed a prerequisite bug.
Fixed issues with WS-Trust and Office 365 Authentication deprecation and retirement. Also updated .NET Framework, updated NuGet packages and some other fixes and feature enhancements.
Also, updated to work with the latest version of the CrmSvcUtil.exe.