Visual Studio 2019 is now available for developers and dynamics 365 CE version 9.x Software Development Kit (SDK) too. However Dynamics 365 Developer Toolkit only supports for Visual Studio 2012, 2013, 2015 and it uses Dynamics 365 CE SDK 8.x assemblies and tools.
This article to make Dynamics 365 Developer Toolkit workable for VS 2019 and to prevent some common issues when setting up Plugin Library project to work with Dynamics 365 CE version 9.x core assemblies.
Special thanks to Sucheet Chavan for sharing useful information to the article.
Setting up Developer Toolkit for VS2019
Although Dynamics 365 Developer Toolkit doesn’t support after Visual Studio 2015, developers perform few workarounds to use the extension with VS2017. Following article is still valid for VS2019 with one change to the extension.
Convert DateTime to a string with a relevent format
var usCultureInfo = new CultureInfo ("en-US", false);
var date = new DateTime (2012, 3, 22, 15, 6, 0);
date.ToString ("MM/dd/yy", usCultureInfo);
Binding data from a Dictionary is not so challenging as “Key” and “Value” pairs can be used for the drop down list properties. Following code samples show the results after assigning data source to the drop down list.
Dictionary genderDictionary = new Dictionary();
this.ddlGender.DataSource = genderDictionary;
GACUTIL is the tool available to register assemblies to the GAC.
Eg.g gacutil.exe /i C:\MyAssemblies\test1.dll
But if there are more than one assemblies to be registered, use following in the command prompt
FOR %a IN (C:\MyAssemblies\*.dll) DO GACUTIL /i %a
You can get the public key token by using following command. Keep in mind that the dll should be a “Strongly Typed” one.
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>sn -T C:\sdk\Microsoft.Xr
Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Public key token is 31bf3856ad364e35