I have a CRM365 V9 installation on premise. The application requires to create a custom workflow using C# and Visual Studio 2019. Our target is to register it and be able to debug it using the plug in profiler. Everything works as expected until we get to the point of registering the custom workflow. At that point there is an error message saying that the .Net Framework used to compile it is higher than 4.6.2 which is true, we did compile against 4.7.
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: This plugin assembly uses version 4.7 of the .NET Framework. At this time Microsoft Dynamics 365 requires version 4.6.2 of the .NET Framework for plugin assemblies. Rebuild this assembly using .NET Framework version 4.6.2 and try again.
Our development machines currently have the .NET Framework 4.7 and 4.7.2 since they are automatically updated by the Dev. Center. In the Visual Studio project properties I cannot select the 4.6.2 because it does not exist in the list. I tried installing manually but the installer stops me because a higher version of the Framework is already installed.
So basically this is a dead end: one one hand the CRM365 requires the 4.6.2 version but MS does not allow the 4.6.2 to co-exist with a higher version.
Does anybody see any solution to this besides taking a blank machine and re-install software until we get to 4.6.2 Framework; than compile and debug using that only machine. It looks absolutely stupid to me but it is what it is. I don't understand what is in Microsoft mind when they create this type of strong dependency.
Thanks you for your time.
We're successfully building and deploying to CRM Online with .NET version 4.7.1. For being able to build in 4.6.2 you need to install the Developer pack not just the runtime. https://dotnet.microsoft.com/download/dotnet-framework/net462