|
1 | 1 | --- |
2 | 2 | title: Assembly version error when importing solution |
3 | | -description: You may receive an assembly version error when importing a Microsoft Dynamics 365 solution. Provides a resolution. |
4 | | -ms.reviewer: |
5 | | -ms.topic: troubleshooting |
6 | | -ms.date: 03/31/2021 |
| 3 | +description: Solves an assembly version error that might occur when importing a Microsoft Dynamics 365 solution. |
| 4 | +ms.date: 03/20/2025 |
7 | 5 | ms.custom: sap:Working with Solutions |
8 | 6 | --- |
9 | | -# Assembly version error when importing a Microsoft Dynamics 365 solution |
| 7 | +# Assembly version error when importing a Dynamics 365 solution |
10 | 8 |
|
11 | | -This article provides a resolution for the assembly version error that occurs when you import a solution in Microsoft Dynamics 365 (online). |
| 9 | +This article provides a resolution for an assembly version error that might occur when you import a solution in Microsoft Dynamics 365. |
12 | 10 |
|
13 | 11 | _Applies to:_ Microsoft Dynamics 365 |
14 | 12 | _Original KB number:_ 4345239 |
15 | 13 |
|
16 | 14 | ## Symptoms |
17 | 15 |
|
18 | | -When you attempt to import a solution in Microsoft Dynamics 365 (online), the import fails with the following message: |
| 16 | +When you try to import a solution in Dynamics 365, the import might fail with the following error message: |
19 | 17 |
|
20 | 18 | > The import of solution: [solution name] failed |
21 | 19 |
|
22 | | -If you select **Download Log File**, you see details similar to the following message: |
| 20 | +If you select **Download Log File**, you might see a message like this: |
23 | 21 |
|
24 | | -> An error occurred while importing a Solution. : Microsoft.Crm.CrmException: This plugin assembly uses version {0} of the .NET Framework. At this time Microsoft Dynamics 365 requires version {1} of the .NET Framework for plugin assemblies. Rebuild this assembly using .NET Framework version {1} and try again. at Microsoft.Crm.ObjectModel.TargetFrameworkVersionValidator.ValidateInternal() at Microsoft.Crm.ObjectModel.PluginValidatorBase.Validate() at Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal\`1.ValidateAssemblyMetadata(ExecutionContext context, IBusinessEntity pluginAssembly, CrmPluginAssemblyMetadata assemblyMetadata) at Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal\`1.VerifyRegistrationAbility(IBusinessEntity pluginAssembly, Boolean createCall, ExecutionContext context, CrmPluginAssemblyMetadata assemblyMetadata) at Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal\`1.ValidateOperation(String operationName, IBusinessEntity entity, ExecutionContext context) at Microsoft.Crm.ObjectModel.SdkEntityServiceBase.CreateInternal(IBusinessEntity entity, ExecutionContext context, Boolean verifyAction) at Microsoft.Crm.Tools.ImportExportPublish.ImportPluginAssemblyHandler.CreateOrGetExistingPluginAssembly(PluginAssembly pluginAssembly, String fileContent, BusinessProcessObject bpoService, Boolean skipValidation, BusinessEntityCollection& existingPluginAssemblies) at Microsoft.Crm.Tools.ImportExportPublish.ImportPluginAssemblyHandler.ImportItem() |
| 22 | +```output |
| 23 | +An error occurred while importing a Solution. : Microsoft.Crm.CrmException: |
| 24 | +This plugin assembly uses version {0} of the .NET Framework. |
| 25 | +At this time Microsoft Dynamics 365 requires version {1} of the .NET Framework for plugin assemblies. Rebuild this assembly using .NET Framework version {1} and try again. at |
| 26 | +Microsoft.Crm.ObjectModel.TargetFrameworkVersionValidator.ValidateInternal() at Microsoft.Crm.ObjectModel.PluginValidatorBase.Validate() at |
| 27 | +Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal`1.ValidateAssemblyMetadata(ExecutionContext context, IBusinessEntity pluginAssembly, CrmPluginAssemblyMetadata assemblyMetadata) at |
| 28 | +Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal`1.VerifyRegistrationAbility(IBusinessEntity pluginAssembly, Boolean createCall, ExecutionContext context, CrmPluginAssemblyMetadata assemblyMetadata) at |
| 29 | +Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal`1.ValidateOperation(String operationName, IBusinessEntity entity, ExecutionContext context) at |
| 30 | +Microsoft.Crm.ObjectModel.SdkEntityServiceBase.CreateInternal(IBusinessEntity entity, ExecutionContext context, Boolean verifyAction) at |
| 31 | +Microsoft.Crm.Tools.ImportExportPublish.ImportPluginAssemblyHandler.CreateOrGetExistingPluginAssembly(PluginAssembly pluginAssembly, String fileContent, BusinessProcessObject bpoService, Boolean skipValidation, BusinessEntityCollection& existingPluginAssemblies) at |
| 32 | +Microsoft.Crm.Tools.ImportExportPublish.ImportPluginAssemblyHandler.ImportItem() |
| 33 | +``` |
25 | 34 |
|
26 | | -In the example provided above, {0} is a version that is too high and {1} is the currently supported version. You may also see a reference to error code **8004420B**, **8004418B**, or **-2147204725**. |
| 35 | +In the preceding log, `{0}` represents the .NET Framework version used in the plug-in assembly, which is incompatible, and `{1}` represents the .NET Framework version required by Dynamics 365. Additionally, you might receive error codes such as **8004420B**, **8004418B**, or **-2147204725**. |
27 | 36 |
|
28 | 37 | ## Cause |
29 | 38 |
|
30 | | -This error can occur if you are trying to import a solution that includes a plugin assembly compiled on a version of the .NET Framework that is not currently supported by Microsoft Dynamics 365 (online). |
| 39 | +This error occurs when the imported solution includes a plug-in assembly compiled using a version of the .NET Framework that's not currently supported by Dynamics 365. |
31 | 40 |
|
32 | 41 | ## Resolution |
33 | 42 |
|
34 | | -Recompile the assembly using the mentioned version of the .NET Framework. |
| 43 | +To solve this issue, recompile the plug-in assembly using the specified version of the .NET Framework, and then reimport the solution. |
35 | 44 |
|
36 | | -For information about the .NET Framework version currently supported by Microsoft Dynamics 365 (online), see [Supported extensions for Microsoft Dynamics 365](/previous-versions/dynamicscrm-2016/developers-guide/gg328350(v=crm.8)). |
| 45 | +## More information |
| 46 | + |
| 47 | +- For information about the .NET Framework versions currently supported by Dynamics 365, see [Support for .NET Framework versions](/power-apps/developer/data-platform/supported-customizations#support-for-net-framework-versions). |
| 48 | +- For guidelines on configuring and building assemblies for Microsoft Dataverse plug-ins, see [Build and package plug-in code](/power-apps/developer/data-platform/build-and-package). |
0 commit comments