UnregisterSolution Message (CrmService)
![]() |
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
| Works for all deployment types | Works online only |
Unregisters a plug-in or custom workflow activity assembly.
The relevant classes are specified in the following table.
| Type | Class |
| Request | UnregisterSolutionRequest |
| Response | UnregisterSolutionResponse |
Remarks
To use this message, pass an instance of the UnregisterSolutionRequest class as the request parameter in the Execute method.
All plug-ins or custom workflow activity plug-ins contained in the assembly that are registered with Microsoft Dynamics CRM are unregistered. There is no supported way by using UnregisterSolution to selectively unregister individual plug-ins for an assembly containing multiple plug-ins. Use the RegisterSolution message to re-register any plug-ins in the assembly.
An alternative method is to use the Delete message with the TargetDeleteSdkMessageProcessingStep class to unregister a specific plug-in a multiple plug-in assembly. Refer to the PluginRegistration tool's source code at SDK\Tools\PluginRegistration for example code.
For a list of required privileges, see UnregisterSolution Privileges.
Example
[C#]
// Set up the CRM service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0;
token.OrganizationName = "AdventureWorksCycle";
CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
//Create the unregister request.
UnregisterSolutionRequest request = new UnregisterSolutionRequest();
request.PluginAssemblyId = PluginAssemblyId;
//Execute the unregister request.
UnregisterSolutionResponse response = (UnregisterSolutionResponse)service.Execute(request);
[Visual Basic .NET]
' Set up the CRM service.
Dim token As New CrmAuthenticationToken()
' You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0
token.OrganizationName = "AdventureWorksCycle";
Dim service As New CrmService()
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials
'Create the unregister request.
Dim request As New UnregisterSolutionRequest()
request.PluginAssemblyId = PluginAssemblyId
'Execute the unregister request.
Dim response As UnregisterSolutionResponse = CType(service.Execute(request), UnregisterSolutionResponse)
See Also
Concepts
Reference
.gif)