The type or namespace name ‘Xrm’ does not exist in the namespace ‘Microsoft’

I just created, for the first time, a plugin for a partner hosted CRM 2015 installation. After adding the Microsoft.Xrm.Sdk.dll assembly reference to the project, I tried to build, only to get this error:

The type or namespace name ‘Xrm’ does not exist in the namespace ‘Microsoft’

After digging a bit, it quickly became obvious that it was a .net framework version related issue. It took me another while to find this page: https://msdn.microsoft.com/en-us/library/dn481609.aspx and realize that the last release of the Microsoft Dynamics CRM SDK for Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update is built on .NET Framework 4.5.2. So I had to install it. As explained on the page, when installing .NET Framework 4.5.2 on your development computer, be sure to install the developer pack and not just the run-time. This will enable the 4.5.2 framework to be chosen in the New Project dialog box of Visual Studio and in the target framework drop-down menu of the project’s properties.

That solved my problem.