on 2011 Apr 22 1:17 AM
I just downloaded the NCo3, 64 bit for .NET4 and am trying to just compile the Tutorial that came in the ZIP file.
I am running W7 64 bit, .net 4 and VS2010 Express.
In "Programs" under control panel, it says SAP .NET Connector 3.0 for x64
I've added references to SAPNCO.dll and SAPNCO_UTILS.dll (which oddly reside in the Program Files (X86) directory.
When I try to compile the Tutorial project, I get two warning messages:
*Assembly generaton - References assembly 'sapnco_utils.dll' targets a different processor*
*Assembly generaton - References assembly 'sapnco_utils.dll' targets a different processor*
Googling around it seems like this message indicates a 32 bit DLL is being compiled with a 64 bit application however the warning can be ignored.
When I try to run the application, i receive this Exception
System.BadImageFormatException was unhandled
Message=Could not load file or assembly 'sapnco_utils, Version=3.0.0.42, Culture=neutral, PublicKeyToken=50436dca5c7f7d23' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source=PMGSAP
FileName=sapnco_utils, Version=3.0.0.42, Culture=neutral, PublicKeyToken=50436dca5c7f7d23
FusionLog==== Pre-bind state information ===
LOG: User = wardell-PC\wardell
LOG: DisplayName = sapnco_utils, Version=3.0.0.42, Culture=neutral, PublicKeyToken=50436dca5c7f7d23
(Fully-specified)
LOG: Appbase = file:///C:/Users/wardell/documents/visual studio 2010/Projects/PMGSAP/PMGSAP/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : PMGSAP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\wardell\documents\visual studio 2010\Projects\PMGSAP\PMGSAP\bin\Debug\PMGSAP.vshost.exe.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: sapnco_utils, Version=3.0.0.42, Culture=neutral, PublicKeyToken=50436dca5c7f7d23
LOG: Attempting download of new URL file:///C:/Users/wardell/documents/visual studio 2010/Projects/PMGSAP/PMGSAP/bin/Debug/sapnco_utils.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
StackTrace:
at SAP.Middleware.Connector.Examples.Tutorial.Main(String[] args)
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
I have found that on Windows 7 x64, I still had to run the 32bit version of the connector. However, when I switch over to our Windows Server 2008 R2 box, the 64 bit version of the connector works and the 32 bit version does not.
hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.