cancel
Showing results for 
Search instead for 
Did you mean: 

.NET Connector x64 (sapnco) in Visual Studio 2012 debug mode

former_member197445
Contributor
0 Kudos

So can anybody tell me what I need to do to be able to debug a web application in Visual Studio that uses the .NET Connector 3 64-bit?  I have set my target to x64, but I still get the dreaded Could not load file or assembly 'sapnco' or one of its dependencies. An attempt was made to load a program with an incorrect format.....

The site runs fine in IIS both locally and on a server, but I sure would like to be able to run from Visual Studio.  Using 32-bit DLLs is usually my solution, but this time around I have to use the 64-bit DLLs.  My development machine is, of course, 64-bit.

Has anybody been able to discover the right settings to be able to debug?

Accepted Solutions (1)

Accepted Solutions (1)

former_member197445
Contributor
0 Kudos
OK, I figured it out.  Here's the scoop:
  • In another post on SCN, Ulrich Schmidt mentions the basics of why mixed-environments are not permitted when using the .NET Connector, so I won't re-hash them here.
  • All projects in your VS Solution must target 64-bit.
  • Your debug/local IIS Web Server must also be 64-bit.  Here's where my problem was.  I assumed since my machine is 64-bit, my IISExpress is 64-bit.  Not so.
  • Your options are to install IIS locally (most developers already have this installed, I would think), and uncheck the box for "Use IIS Express" on the "Web" tab of your project properties.
    OR
  • Keep "Use IIS Express" checked and add the following DWORD to your Windows registry.
    HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\WebProjects   Use64BitIISExpress (value 1).  I found this advice here: http://goo.gl/uiHLxe


Answers (0)