开发者

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

开发者 https://www.devze.com 2023-02-12 01:32 出处:网络
I have two projects in my solution: MyApp.Domain and MyApp.WebService. MyApp.WebService is a WCF service library.

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 MyAp开发者_开发问答p.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.

0

精彩评论

暂无评论...
验证码 换一张
取 消