Data processing extension ERROR: Exception caught instantiating <Extension Name>report server extension: System.BadImageFormatException: Could not load file or assembly or one of its dependencies. This assembly
Hi, I'm creating an processing data extension for SQL 2008 R2 by following instructions http://msdn.microsoft.com/en-us/library/ms154655.aspx. When I try to check the deployment on the server side I'm getting the error in the log file: e ERROR: Exception caught instantiating MSCRMONLINE report server extension: System.BadImageFormatException: Could not load file or assembly 'Microsoft.BPCRM.DataProcessingExtension' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. File name: 'Microsoft.BPCRM.DataProcessingExtension' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.ReportingServices.Diagnostics.ExtensionClassFactory.LoadAssembly(String name) at Microsoft.ReportingServices.Diagnostics.ExtensionClassFactory.<>c__DisplayClass2.<CreateExtensionObject>b__0() at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.<>c__DisplayClass1.<Run>b__0(Object state) at System.Security.SecurityContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state) at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.Run(ContextBody callback) at Microsoft.ReportingServices.Diagnostics.ExtensionClassFactory.CreateExtensionObject(Extension extConfig, Boolean typeOnly) For development I'm using VS 2010 and .NET Framework 4. Is there any way to use extensions compiled for .NET 4? Thanks Natasa
December 26th, 2010 7:21pm

The error message says: "System.BadImageFormatException: Could not load file or assembly 'Microsoft.BPCRM.DataProcessingExtension' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded." The error says that the version in which the custom assembly is built is of later versions than that of the supported ones. Did we use .NET Framework 4.0 to build the custom assembly? If yes, can you please use .NET Framework 3.5 instead and then give a try. Hope this helps!Chaitanya
Free Windows Admin Tool Kit Click here and download it now
December 27th, 2010 12:31am

Thanks Chaitanya. Yes I've built it by using Framework 4.0 since we are referencing CRM 2011 dlls. Is there any way to handle this?Natasa
December 27th, 2010 8:17am

Please rebuild the same assembly with Framework 3.5. AFAIK it has a minimum requirement of Framework 3.5, even though 4.0 is the later edition, it might still look for some of its dependencies.. While building the custom assembly, change the target framework to 3.5, and rebuild the same. Hope this helps!!Chaitanya
Free Windows Admin Tool Kit Click here and download it now
December 27th, 2010 9:10am

Yes, it is good to know. But my CRM dlls are already built with Framework 4.0, I'm just referencing those.Natasa
January 3rd, 2011 7:57pm

If they are the custom build assemblies you can always rebuild them, or ask your application team to rebuild those in Framework 3.5. Are they being build specifically to use with SSRS?Chaitanya
Free Windows Admin Tool Kit Click here and download it now
January 3rd, 2011 10:52pm

If they are the custom build assemblies you can always rebuild them, or ask your application team to rebuild those in Framework 3.5. Are they being build specifically to use with SSRS?Chaitanya
January 3rd, 2011 10:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics