Category Archives: CRM SDK

CrmDeveloperCenter.com

Have you seen the latest CRM Developer Center? It is a great place for developers getting started with Dynamics CRM. The search has been customised and improved to find content only related to CRM, see below an example.

In the same site, have a look at the Documentation section, which contains useful things like the new Preview WEP API coming soonDynamics Marketing and Unified Service Desk.

Also there are many resources for those interested on Mobile development, have a look at Mobile SDK.

RTB_BLOG_SearchAtCRMDeveloperCentre

 

Notice how “entity” brings results only relevant about Dynamics CRM (e.g. rather than Entity Framework)

RTB_BLOG_SearchAtCRMDeveloperCentre2

 

 

Advertisements

Dynamics CRM 2015 SDK and Developer Toolkit

The new CRM SDK  2015 doesn’t give support yet for our known CRM Developer Toolkit,  which has been part of the CRM SDK until CRM 2013. Basically, the CRM SDK 2015 assemblies have been compiled with .NET Framework 4.5.2, but CRM Developer Toolkit was compiled using NET Framework 4.5. See the next Microsoft article for more details.

For instance, let’s check the new assembly Microsoft.xrm.sdk.dll part of the CRM SDK 2015: 

SDK2015_Microsoft.Xrm.Sdk_ILSpy

 

The good news are… we still can make compatible the Developer Toolkit with the latest CRM SDK 2015 editing the .NET Framework in the corresponding projects of our Visual Studio solution. Let’s say we have the next CRM solution:

CRM_DeveloperToolkit_SampleSolution

 

For plugins and workflows, we should update the references to the new assemblies and also the .NET Framework in the project properties:

CRM_DeveloperToolkit_UpdateAssemblyReferences

After updating those references, we could still find the following error:

“The type or namespace name ‘Xrm’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)”

This error is indicating you haven’t got installed the expected .NET Framework 4.5.2. Do right click on the same project and select Properties to check the version actually used:

CRM_DeveloperToolkit_TargetFramework_4.5.1

If you are only getting old versions of the Target Framework, select “Install other frameworks…” that will take you to the next site:

http://blogs.msdn.com/b/dotnet/p/dotnet_sdks.aspx

There you must download .NET Framework 4.5.2 Developer Pack.

After it has been installed, you get a new option in that previous list:

CRM_DeveloperToolkit_TargetFramework_4.5.2

Finally, we need to do something similar with the CRM Package Project. But in this case, we will have to edit the project file and update the entry “TargetFrameworkVersion” to “4.5.2”. Start unloading the project:

UnloadCRMPackageProject

Update the mentioned entry “TargetFrameworkVersion“:

EditCRMPackageProject

Finally, reload the project again and everything should work now!

ReloadCRMPackageProject

About this last part, I would like to say thanks to my CRM MVP colleague Scott Durow (@ScottDurow), who helped me to find that entry.

If you don’t update the package project, it may still compiled, but the actual deployment will fail and you should see the next warning in the Visual Studio output:

warning MSB3274: The primary reference “[Your Assembly Name].dll” could not be resolved because it was built against the “.NETFramework,Version=v4.5.2” framework. This is a higher version than the currently targeted framework “.NETFramework,Version=v4.5”

warning MSB3275: The primary reference “[Your Assembly Name].dll” could not be resolved because it has an indirect dependency on the assembly “Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35” which was built against the “.NETFramework,Version=v4.5.2” framework. This is a higher version than the currently targeted framework “.NETFramework,Version=v4.5”