Manage your SDK assemblies the easy way

NuGet has become the de-facto way of managing assembly references from within Visual Studio. Using the Package Manager you can easily download, install, update and uninstall referenced libraries automatically from the ever growing NuGet library repository.

In the past there was an unofficial package, but with the release of CRM2013, the SDK team have made the official assemblies available on NuGet. You can install the references to the CRM2013 SDK assemblies by Right Clicking on your Project from within Visual Studio and selecting Manage NuGet Packages…

If you search for Microsoft.CrmSdk in the Online tab, you will see a list of the official SDK assemblies.

Here are 5 really great things about using NuGet:

  1. All referenced assemblies are stored in a single solution folder named packages so that each project will reference the same assembly version inside your solution.
  2. You can update to the latest version using the 'Updates' tab inside the NuGet Package manager (or a specific version using the command line package manager).
  3. Any dependency assembly packages (e.g. IdentityModel) will automatically be downloaded and referenced in your solution
  4. You don't need to commit your dependency packages to Source Control. If you commit only your code to source control and then try and build the project on a new environment, you can easily re-download the assemblies from within the Package Manager using the 'Restore' button.


    If you want to automatically restore these files on build – you can Right Click on your solution and selecting 'Enable NuGet Package Restore'.

    See the article on the NuGet site for more information.
  5. You can use either the package manager to discover and install your packages, or use the NuGet Console to quickly install/uninstall if you know what you're looking for (Tools-> Library Package Manager - >Package Manager Console)

The package inter-dependencies with their names as referenced in NuGet are as follows:

You can see all of them listed at https://www.nuget.org/profiles/crmsdk/

Using the Package Manager Console you could install the latest Core Assemblies for CRM2013 using:

Install-Package Microsoft.CrmSdk.CoreAssemblies

Or you could install the CRM 2011 version using:

Install-Package Microsoft.CrmSdk.CoreAssemblies -Version 5.0.17

If you wanted to install them you can use:

Uninstall-Package Microsoft.CrmSdk.CoreAssemblies

Start using NuGet if you are not already and you'll never look back!

@ScottDurow

Pingbacks and trackbacks (2)+

Comments are closed