Dynamics CRM 2011 Plugin Deploy Error - dynamics-crm-2011

I'm developing a custom plugin for CRM. When I deploy plugin to CRM on Virtual PC, I get the error below.
Error registering plugins and/or workflows. Legacy plugin steps are
only supported in Pre-validation and Post-operation stages
How can I resolve this error ?

Like #Alex has said, it looks like you are using the CRM 4 sdk to develop your plugins. I would recommend using the CRM 2011 SDK in order to not have to rewrite your plugins once you upgrade to 2013 or above. Here's the link:
https://www.microsoft.com/en-us/download/details.aspx?id=24004

Related

how to update classes for update roll up 18

I have to prepare the project for crm 2011's Update RollUp 18. From what I understand, from now onward the Micrososft.CRM.SDK dll is not supported anymore, thus I have removed it from my project. As one would expect, a lot of "could not be found" errors appeared because of the removal. For the code bellow, I have ".. Property could not be found.." and "..StringProperty could not be found .." .
public class ExtMergeName : ExtPropertyBase, ICrmString
{
public Property GetValue()
{
return CrmStringObject;
}
public StringProperty CrmStringObject
{
get
{
return (StringProperty)ReturnStringProperty();
}
}
What can I replace them with?
You are showing a snippet of Dynamics CRM 4.0 code. This is supported in Dynamics CRM 2011, up to the most recent Rollup Update. Support for CRM 4.0 is removed in Dynamics CRM 2013.
When your goal is to upgrade to CRM 2011 only, you can keep your VS projects as is, i.e. referencing assembly microsoft.crm.sdk.dll.
When you are planning to continue upgrading to CRM 2013 or CRM 2015, you need to rewrite your CRM 4.0 code. (Plugins, workflow activities, Javascript, external components accessing the CRM end points.)
More information about the programming model of Dynamics CRM 2011 and how to upgrade from CRM 4.0 can be found on MSDN:
Introduction to Programming Models for Microsoft Dynamics CRM
Summary of Changes Between Versions
In CRM 2011 and newer versions the microsoft.crm.sdk.proxy.dll is used, along with microsoft.xrm.sdk.dll. If you're not already using proper version of the CRM 2011 SDK, you can get that here: http://www.microsoft.com/en-us/download/details.aspx?id=24004. If you're trying to use the strongly typed entity classes in custom code, you can generate a correct version of that using the crmsvcutil.exe that comes with the SDK. If that's not exactly what you're looking for, then please provide additional details so I can better understand what you're trying to do.

Where is Dynamics CRM 2013 Xrm.Page Script Library Template?

In Dynamics CRM 2011 SDK the Xrm.Page Script Library template was at SDK\Templates\Xrm.PageScriptProjectTemplate location. But in CRM 2013 SDK no such location exists.
Also no such file campe up in folder search.
Do anybody have an idea about this?
I was the author of that template and chose to distribute it in the CRM SDK for CRM 2011. However, things got really busy and we just didn't have the bandwidth to maintain it. A third party solution: CRM Solution Manager (http://crmsolutionmanager.com) picked up the form scripting parts of it and added improvements along with many other useful capabilities. I would take a look at their solution if you found it helpful.
As far as I know the template has not been released for CRM 2013.
You can use the CRM 2011 one, but of course will not contains the new client methods introduced with CRM 2013.

Official Microsoft NuGet Source

I would like to filter and search through the Microsoft released NuGet packages as a source but I cannot seem to find a way to only start with the Microsoft packages with the NuGet API; does anyone know the syntax or a URL to such a hive?
So MS actually provides the answer in the settings of VS 2013: https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/
Works great in any application that utilises the NuGet API; LINQPad included!

TFS Online 2012 / How to Deploy Custom Check-In Policies

I am going to create a custom check-in policy and I'm using TFS Online and VS2012. I could find a video describing this procedure but it's rather old documentation. I've tried to find clear documentation on how to accomplish this in my specific environment to no avail.
Are any new ways of accomplishing this in the environment I'm working on TFS Online / VS2012.
Is there any gotcas I should be aware of?
Should I consider looking into TFS PowerTools?

Could not load file or assembly 'Microsoft.Xrm.Client

I have created a plug-in in CRM. It’s registered successfully. Inside my plug-in I have created a web service with many functions.
After successful calling of plug-in step I am getting error-
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Xrm.Client, Version=5.0.9689.2166, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies`. The system cannot find the file specified.
To solve this issue I have created the New XRM.cs file from crmsvcutil.exe but got the same issue. Searched more about this but no solutions found yet.
NOTE: I am using the Microsoft hosted version of CRM
Here below the reference files which I am using.
microsoft.crm.sdk.proxy
Microsoft.CSharp
microsoft.xrm.client
microsoft.xrm.portal
microsoft.xrm.sdk
System
System System.Core
System.Data
System.Data.Services
System.Data.Services.Client
System.DirectoryServices.AccountManagement
System.Runtime.Serialization
System.ServiceModel
System.Xml
System.Xml.Linq
Is there any way to run my plugin on Hosted version of CRM???
Appreciate if any help :)
I have solved this issue by using this command.
CrmSvcUtil.exe /out:"Xrm.cs"
/url:http://crm/Contoso/XRMServices/2011/Organization.svc
/namespace:Xrm
/servicecontextname:XrmServiceContext
/servicecontextprefix:Xrm
removing code customization options solved my issue.
/codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration"
Microsoft.XRM.Client is usually not needed by the plug-in.
It is needed to connect to CRM from an outside application.
Microsoft.XRM.Client has been removed from the SDK since CRM 2016.
Plugins do not automatically resolve dependencies in your project, they have to already be on the server.
Microsoft.XRM.Client can be placed in the GAC if it is needed by the plugin.
Update for Dynamics CRM 2015
The NuGet package Microsoft.CrmSdk.Extensions contains Microsoft.Xrm.Client.
Update for Dynamics CRM 2016 and Dynamics 365
Microsoft.Xrm.Client is no longer part of the SDK.
The NuGet package Microsoft.CrmSdk.CoreAssemblies contains everything needed for plugin development.
The various parts of the Dynamics CRM SDK are in NuGet.
NuGet is a much better solution than adding Dynamics CRM dlls as project references; especially for source control and team development.
Microsoft.Xrm.Client.dll doesn't actually appear to work if running from the GAC. This is because of some dodgy type resolution methods it has that only work if the assembly is loaded locally. I have raised an issue with full details about that here: https://community.dynamics.com/crm/f/117/t/144464.aspx

Resources