OverviewThis 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 VersionsPlease 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. Version HistoryVersion 1.0Initial Version Version 1.1The 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. Version 1.2With version 1.2, an issue was corrected regarding the project name being used for the namespace instead of the project's default namespace. Version 1.3With version 1.3, I updated the application to make use of the latest version 9.0.0.7 SDK assemblies, which allow for TLS 1.2 communication, as well as updating the target .NET Framework to 4.6.2. Version 1.4Version 1.4 sees the use of the 9.0.2.5 SDK assemblies. Version 1.5Version 1.5 sees the use of the 9.0.2.9 SDK assemblies and other updated assemblies. Version 1.6Version 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.7Version 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.8Version 1.8: an option has been included to specify explicit parameters to override the Microsoft.Xrm.Tooling.CrmConnectControl inputs. Version 1.9The Microsoft XRM Tooling WPF Component was removed and replaced by custom capability. Also upgraded to .NET Framework 4.7.2 and to use version 9.0.2.17 of the SDK assemblies. Version 1.10Updated to use version 9.0.2.19 of the SDK assemblies. Version 1.11Updated NuGet packages to the latest versions. Include support for Visual Studio 2015, Visual Studio 2017 and Visual Studio 2019. Version 1.12Bug fixes regarding prerequisites. Version 1.13Fixed a bug with online password disappearing. Version 1.14Fixed a bug with MPF Dependency. Version 1.15Fixed a prerequisite bug. Version 1.16Fixed 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. |