Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly 'sapnco' or one of its dependencies. An attempt was made to load a program with an incorrect format

Tags:

c#

.net

sap

I have got this error while I am using SAP .NET Connector 3.0 x64. I couldn't find any solution at stackoverflow, so I d like to share here for others who stuck at same problem like me.

like image 317
Mert Avatar asked Sep 17 '14 09:09

Mert


2 Answers

In VS 2017 I was able to resolve this by setting the Bitness to "x64" for IIS Express in the server section under the project web properties. I imagine this is similar to making the Use64BitIISExpress Regedit change in one of the other answers.

enter image description here

like image 156
John81 Avatar answered Sep 21 '22 10:09

John81


Run > Regedit

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\1X.0\WebProjects   

Change Use64BitIISExpress from 0 to 1 Restart Visual Studio and IISExpress.

like image 23
Mert Avatar answered Sep 17 '22 10:09

Mert