Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Pedro Coelho
62
Views
4
Comments
There was an error validating the extension: System.BadImageFormatException:
Question
Hi,
I'm having problems publishing an extension, and I have this error:
There was an error validating the extension: System.BadImageFormatException: Could not load file or assembly 'file:///C:\Windows\TEMP\BuzgPCjSakWb1fxCjNaYNg\Source\NET\Bin\OutSystems.NssMicrosoftTranslatorAPI.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
File name: 'file:///C:\Windows\TEMP\BuzgPCjSakWb1fxCjNaYNg\Source\NET\Bin\OutSystems.NssMicrosoftTranslatorAPI.dll'
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.LoadFrom(String assemblyFile)
at OutSystems.HubEdition.ServerCommon.Extensions.ExtensionValidator.CheckExtensionConsistency(String temporaryXIFPath, String temporaryResourcesDirPath, String compoundTypesXml)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I added the extension, can anyone help?
Thanks,
Pedro
MicrosoftTranslatorAPI.xif
André Vieira
Staff
Hi Pedro,
Does the extension compile on Visual Studio? What is the target Framework?
Cheers
Pedro Coelho
Hi André,
In Visual Studio I do not have errors and targer Framework is 3.5
Thanks
João Rosado
Staff
Hi Pedro,
The error explicitly says "
This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded". I checked and the dll inside the extension is actually built with .net 4.0, even though the project looks correctly configured.
To solve your problem try editing the MicrosoftTranslatorAPI.csproj final manually and change the ToolsVersion="2.0" to ToolsVersion="4.0"
This can be caused by a Visual Studio 2010 bug that creates assemblies in the wrong version. I mention it in
this post
, it's the "side-effect" of the
warning CS1685 that I talk about.
Regards,
João Rosado
Pedro Coelho
Hi João,
Your solution worked.
Thanks.
Pedro Coelho
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...