Archived

This topic is now archived and is closed to further replies.

Jell

Linking unmanaged library at load time

Recommended Posts

I am linking an unmanaged library at Load time in my vc++.net project. #pragma comment(lib,"xyz.lib") This library exports a simple method which returns "42". exported method code is: CPPCLASSEXPORT_API int Test(void) { return 42; } The code is Building properly. BUT---- when i run the application (actually a vc++.net web service) i get an error page. saying "Configuration Error : Parser Error Message: File or assembly name TestClassExport, or one of its dependencies, was not found. " same library if i test using an MFC exe application, is working fine.i.e. the method returns 42 to the MFC client. so if somebody can help me out to understand what is happening..!!!!!

Share this post


Link to post
Share on other sites
More on the error I am getting...

Parser Error Message: File or assembly name TestClassExport, or one of its dependencies, was not found.


"TestClassExport.dll" is the output DLL, "TestClassExport" is the client namespace. i.e. it is the web service namespace in my project.


Source Error:


Line 196:

Line 197:
Line 198:
Line 199:
Line 200:



Source File: c:\winnt\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 198

Assembly Load Trace: The following information can be helpful to determine why the assembly ''TestClassExport'' could not be loaded.


=== Pre-bind state information ===
LOG: DisplayName = TestClassExport
(Partial)
LOG: Appbase = file:///c:/inetpub/wwwroot/TestClassExport
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).

LOG: Post-policy reference: TestClassExport

LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/testclassexport/c903f4ce/d913a647/TestClassExport.DLL.

LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/testclassexport/c903f4ce/d913a647/TestClassExport/TestClassExport.DLL.

LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/TestClassExport/bin/TestClassExport.DLL.

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: TestClassExport, Version=1.0.1539.33295, Culture=neutral, PublicKeyToken=null



CAN ANYBODY MAKE OUT NOW ????? AND ALSO GUIDE ME HOW TO UNDERSTAND AND INTERPRET ABOVE INFORMATION

Share this post


Link to post
Share on other sites
o..o.. Source Error didnt come up properly..

retyping it for ur reference..


Source Error:


Line 196: add assembly="System.EnterpriseServices,Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Line 197:add assembly="System.Web.Mobile, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Line 198:add assembly="*"

Line 199:assemblies

Line 200:compilation


Share this post


Link to post
Share on other sites