Symptom

When attempting to import a solution in Dynamics 365, the solution import fails with the following message:

"The import of solution: [solution name] failed"

If you view the details in the grid that is included and click Download Log File, you see details such as the following:

"Input string was not in a correct format thrown by the application when processing a custom (plug-in) assembly.

0x80048033 Input string was not in a correct format."

The following error details are also included:

Microsoft.Crm.Tools.ImportExportPublish.ImportSolutionException: Plugin Assemblies import: FAILURE. Error: Plugin: <ASSEMBLY NAME>, Version=0.0.0.0, Culture=neutral, PublicKeyToken=[token] caused an exception. ---> System.FormatException: Input string was not in a correct format.
   at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at Microsoft.Crm.ObjectModel.TargetFrameworkVersionValidator.ValidateInternal()
   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)
   at Microsoft.Crm.ObjectModel.SdkEntityServiceBase.UpdateInternal(IBusinessEntity entity, ExecutionContext context, Boolean verifyAction)
   at Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal`1.Update(IBusinessEntity entity, ExecutionContext context)
   at Microsoft.Crm.Tools.ImportExportPublish.ImportPluginAssemblyHandler.ImportItem()
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Tools.ImportExportPublish.ImportPluginAssemblyHandler.ImportItem()
   at Microsoft.Crm.Tools.ImportExportPublish.ImportHandler.Import()
   at Microsoft.Crm.Tools.ImportExportPublish.RootImportHandler.ImportAndUpdateProgress(ImportHandler ih)
   at Microsoft.Crm.Tools.ImportExportPublish.RootImportHandler.ProcessNonMetadataHandlers(String[] ImportEntities, ImportHandler& ihForCurrentPath, CounterList listCounters)
   at Microsoft.Crm.Tools.ImportExportPublish.RootImportHandler.RunImport(String[] ImportEntities)
   at Microsoft.Crm.Tools.ImportExportPublish.ImportXml.RunImport(String[] ImportEntities)
   at Microsoft.Crm.Tools.ImportExportPublish.ImportXml.RunImport()
   at Microsoft.Crm.Tools.ImportExportPublish.ImportXml.RunImport(Boolean withSolutionManifest)
   at Microsoft.Crm.WebServices.ImportXmlService.ImportSolutionSkipCapable(Boolean overwriteUnmanagedCustomizations, Boolean publishWorkflows, Byte[] customizationFile, Guid importJobId, Boolean convertToManaged, Boolean skipProductUpdateDependencies, Boolean holdingSolution, ExecutionContext context)
 

Cause

This error can occur if the plug-in assemlbly is using a later version of the .Net Framework such as 4.6.1 and 4.6.2. Currently Dynamics 365 (online) only supports .NET SDK assemblies built on .NET Framework 4.5.2.

Resolution

The affected assembly must be compiled with .NET Framework 4.5.2:

  1. Open Visual Studio

  2. Right click on the project which contains the affected assembly and click Properties

  3. Change the Target framework to .NET Framework 4.5.2

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Any additional feedback? (Optional)

Thank you for your feedback!

×