Installing

There are 2 major versions you want to consider before installing FakeXrmEasy.

  • Versions 2.x : Is the version that depends on the traditional Microsoft.CrmSdk.CoreAssemblies and therefore supports server-side development as the latest Dataverse Service Client by Microsoft is not yet intended for server-side development. These versions target .NET Framework. It is meant to be used as a transition package until there is full server-side development in .net core supported.

  • Versions 3.x: These are versions that target .net core 3.1 and use the latest Dataverse Service Client package (1.0.1 as of the date of this post).

Within each major version there are multiple packages with specific SDK dependencies based on the Dataverse / Dynamics CRM environment you want to develop against. These use the following naming convention:

FakeXrmEasy.{PackageName | }.{v9 | v365 | v2016 | v2015 | v2013 | v2011}

Note: These samples cover installing FakeXrmEasy from the Powershell command line, but you could do either install them via NuGet Package Manager in visual studio or via ‘dotnet add package’ as well.

The easiest is to install the main FakeXrmEasy package for your relevant version of Dataverse / Dynamics CRM:

Install-Package FakeXrmEasy.{ v9 | v365 | v2016 | v2013 | v2011 } -Version 2 | 3

For example, if you are using v9 of Dynamics 365 or Dataverse, and want to develop and test plugins, then install:

Install-Package FakeXrmEasy.v9 -Version 2.2.0

For example, or if you are using v9 of Dynamics 365 or Dataverse, and want to develop and test azure functions or any other client application, then install:

Install-Package FakeXrmEasy.v9 -Version 3.2.0

That is an include package that will automatically install most of the other packages below.

If you want to have a more fine-grained control about dependencies, you might want to install directly the packages below, which will each pull their necessary dependencies.

Mapping of FakeXrmEasy package name and Dataverse / Dynamics version

FakeXrmEasy Package NameDynamics / Dataverse major version
v99.x
v3658.2
v20168.1
v20157.x
v20136.x
v20115.x

Plugins

If you want to develop and test plugins, please install

Install-Package FakeXrmEasy.Plugins.vxxx -Version 2.x 

CodeActivities

Code Activities are steps in traditional, now legacy, workflows

If you want to develop and test code activities, please install

Install-Package FakeXrmEasy.CodeActivities.vxxx -Version 2.x 

Minimal

For a minimal setup, just go for the FakeXrmEasy.Core. the version will vary depending if you want .net core 3.1 (3.x) or .NET framework (2.x). This version might be ideal for testing AzureFunctions or other client applications, like backend of MVC applications. You’ll need the Plugins package though if you want to use the Pipeline Simulation features.

The minimal setup contains only the messages supported by the AddCrud extension method:

  • Create, Retrieve, RetrieveMultiple, Update, Upsert, Delete, Associate, Dissassociate

If you need other messages, then please install the FakeXrmEasy.Messages package.

Install-Package FakeXrmEasy.Core.vxxx -Version 2.x 

Messages

This package contains implementations for further OrganizationRequests.

Install-Package FakeXrmEasy.Messages.vxxx -Version 2.x 

Can I get a little bit of everything?

If you have a project with a mixture of plugins, codeactivities and other code, you might want to install just FakeXrmEasy then. FakeXrmEasy is an include package that will install Core, Messages, Plugins, and CodeActivities, basically everything. If you don’t have that kind of mixture it might be just simpler to install what you need.

For .NET Framework:

Install-Package FakeXrmEasy.vxxx -Version 2.x 

For .net core 3.1:

Install-Package FakeXrmEasy.vxxx -Version 3.x