This is a migrated thread and some comments may be shown as answers.

venhance x86

4 Answers 174 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Wong Chi Chong
Top achievements
Rank 1
Wong Chi Chong asked on 08 Feb 2010, 08:45 AM
Hi,

When I try to compile the ORM enabled project, it show me the following stack:

C:\Users\cc>"c:\program files (x86)\telerik\openaccess orm\sdk\VEnhance.exe" -assembly:D:\M\NN\Snns\Snns\bin\Debug\Snns.dll -config:D:\M\NN\Snns\Snns\App.config -debug+ -verbose+
Telerik OpenAccess Enhancer, Version 2009.3.1119.2
Copyright (C) 1996-2009 Telerik
The specified assembly 'C:\Users\chichong\AppData\Local\Temp\_ptil_8452\Snns.dll
' cannot be loaded. The problem might be that the platform target is set to x64 or itanium. Only x86 is supported now.
   at Telerik.OpenAccess.Sdk.Enhancer.Enhancer.CrossDomainRunImpl(AssemblyLoader assemblyLoader)
   at Telerik.OpenAccess.Sdk.Enhancer.EnhancerBase.CrossDomainRun()
   at Telerik.OpenAccess.Sdk.Enhancer.EnhancerBase.DomainRun(Boolean createDomain)
   at Telerik.OpenAccess.Sdk.Enhancer.Enhancer.ConsoleRun(String assemblyFileName, String configFile, Int32 verboseMode, Boolean dump, Boolean createDomain, ArrayList referencedAssemblies, Boolean checkV, String keyfile, String keyfilePassw
ord, String lic, Boolean enhanceStructs)
InnerException:
Could not load file or assembly 'file:///C:\Users\chichong\AppData\Local\Temp\_ptil_8452\Snns.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
   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 Telerik.OpenAccess.Sdk.Enhancer.Enhancer.CrossDomainRunImpl(AssemblyLoader
 assemblyLoader)

Unhandled Exception: Telerik.OpenAccess.Sdk.Enhancer.EnhancerException: The specified assembly 'C:\Users\chichong\AppData\Local\Temp\_ptil_8452\Snns.dll' cannot be loaded. The problem might be that the platform target is set to x64 or itanium. Only x86 is supported now. ---> System.BadImageFormatException: Could not lo
ad file or assembly 'file:///C:\Users\chichong\AppData\Local\Temp\_ptil_8452\Snns.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'file:///C:\Users\chichong\AppData\Local\Temp\_ptil_8452\Snns.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 Telerik.OpenAccess.Sdk.Enhancer.Enhancer.CrossDomainRunImpl(AssemblyLoader assemblyLoader)

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].

   --- End of inner exception stack trace ---
   at Telerik.OpenAccess.Sdk.Enhancer.Enhancer.CrossDomainRunImpl(AssemblyLoader assemblyLoader)
   at Telerik.OpenAccess.Sdk.Enhancer.EnhancerBase.CrossDomainRun()
   at Telerik.OpenAccess.Sdk.Enhancer.EnhancerBase.DomainRun(Boolean createDomain)
   at Telerik.OpenAccess.Sdk.Enhancer.Enhancer.ConsoleRun(String assemblyFileName, String configFile, Int32 verboseMode, Boolean dump, Boolean createDomain, ArrayList referencedAssemblies, Boolean checkV, String keyfile, String keyfilePassw
ord, String lic, Boolean enhanceStructs)
   at Telerik.OpenAccess.Tools.Enhancer.Main(String[] args)


I'm sure that the dll given is x86 as I use the following code to test:

static void Main(string[] args)
        {
            var a = System.Reflection.Assembly.LoadFile(@"D:\M\NN\Snns\Snns\bin\Debug\snns.dll");
            Console.WriteLine(a.GetTypes().Length);
        }


Do you provide x86 version of venhance.exe ?

Thanks.

4 Answers, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 10 Feb 2010, 08:06 AM
Hello Wong Chi Chong,
Can you set the library to 'any cpu'? There is indeed a problem on 64 bit machines if the project is set to 32 or 64 bit.

Kind regards,
Jan Blessenohl
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
SelAromDotNet
Top achievements
Rank 2
answered on 07 May 2010, 05:54 AM
I'm confused, I folled the instructions here: http://blogs.telerik.com/toddanglin/posts/09-12-15/working_with_openaccess_in_visual_studio_2010_beta_2.aspx

but when I build I get the same x86 error above. I have and always had the cpu set to "any cpu" but I still get the error. what else do I do?
0
Jan Blessenohl
Telerik team
answered on 10 May 2010, 05:29 PM
Hello SelArom,
The only explanation that i have is that your project is a .NET 4.0 project, here the post build is wrong and you have to use the enhancer=true property.

Kind regards,
Jan Blessenohl
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
SelAromDotNet
Top achievements
Rank 2
answered on 10 May 2010, 06:28 PM
I switched it to x86, built the project, got error, then swtiched back to All Cpu and built the project. that seems to have done it...

this was an existing project so there might have been some weird configuration issues, but looks like it's working now, thanks!
Tags
General Discussions
Asked by
Wong Chi Chong
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
SelAromDotNet
Top achievements
Rank 2
Share this question
or