简体   繁体   中英

WCF service library project can't find reference to other project

I have two projects in my solution: MyApp.Domain and MyApp.WebService. MyApp.WebService is a WCF service library.

I want to use some utility functions from MyApp.Domain. So in MyApp.WebService, I added a reference to MyApp.Domain.

Intellisense picked it up just fine, it recognized the function I need to call. But when I build the solution, I get this error:

The type or namespace name 'Domain' does not exist in the namespace 'MyApp' (are you missing an assembly reference?)

at using MyApp.Domain.Utility;

What's going wrong here?

Make sure both are using the same profile... if one is using the client profile you could be getting this error.... also if the referenced assembly has some references in it to other assemblies you may need to include them in the project as well. If that doesn't get it make sure both have the same setting for 32 vs 64 bit...

GL

Remove WCF Service project from Solution and build solution. After building solution, add WCF project again. Issue will be resolved.

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