Answered by:
Error while importing C# dll file onto console

Question
-
User1406963893 posted
Hello,
I'm developing a console in VB and I have to add a dll fine that programed in C#, Once I click run I get error that means I have error in reverences, I made a web application in VB and that file works white out any errors!, Should I do some thing If I have to import C# reverences to my project?
Thank you.
Tuesday, December 23, 2014 1:11 AM
Answers
-
User1428246847 posted
I don't have the open source file of dll file, that file I have got it from some service provider to implement there services.
The same file I implemented on web application vb all service worked with out any errors!!!.
I assume that you know how to debug, so examine the stacktrace and your variables when you get the exception; it's very well possible that your code passes a null (whatever that is in VB) to the method in the dll.
Else, can you share a code snippet of both where you use the method of the dll that causes the issue. And add the stacktrace.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, December 28, 2014 12:51 AM
All replies
-
User-574293449 posted
any specific error? please explain.
Anyway the following thread related to this
http://www.codeguru.com/columns/vb/calling-a-c-dll-from-vb.net.htm
Tuesday, December 23, 2014 1:25 AM -
User1406963893 posted
any specific error? please explain.
Anyway the following thread related to this
http://www.codeguru.com/columns/vb/calling-a-c-dll-from-vb.net.htm
Thank you for your replay,
I have tried that but I have got same error message shown below.
System.ArgumentNullException occurred
Message: A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll
Additional information: Value cannot be null.Tuesday, December 23, 2014 2:02 AM -
User-574293449 posted
something like null exception. You c# a library project is running successfully?
Tuesday, December 23, 2014 2:09 AM -
User1406963893 posted
something like null exception. You c# a library project is running successfully?
I don't have the open source file of dll file, that file I have got it from some service provider to implement there services.
The same file I implemented on web application vb all service worked with out any errors!!!.
Tuesday, December 23, 2014 2:13 AM -
User1428246847 posted
I don't have the open source file of dll file, that file I have got it from some service provider to implement there services.
The same file I implemented on web application vb all service worked with out any errors!!!.
I assume that you know how to debug, so examine the stacktrace and your variables when you get the exception; it's very well possible that your code passes a null (whatever that is in VB) to the method in the dll.
Else, can you share a code snippet of both where you use the method of the dll that causes the issue. And add the stacktrace.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, December 28, 2014 12:51 AM