简体   繁体   中英

WCF Service: Could not load file or assembly or one of its dependencies

I Created a WCF Service and added a dll file as a reference and i am getting the error mentioned in the title during runtime.

Created a WPF application and added the same dll file as a reference but it worked .

The dll file has other references that i added manually in the bin/debug folder of the wpf app.

When i try to do the same for WCF service it is not working.

Please help me figure it out.

I am new to C#. Unfortunately no one answered it, i found solution myself after three hours :(.

A dll file will always be used by an exe file .

In this case the exe was in the folder C:\\Program Files (x86)\\Common Files\\microsoft shared\\DevServer\\10.0 which is the folder for ASP.NET development server.

So the dependent dll files need to be copied there. Copying to the bin folder will not work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM