[英]WCF service library project can't find reference to other project
I have two projects in my solution: MyApp.Domain and MyApp.WebService. 我的解决方案中有两个项目:MyApp.Domain和MyApp.WebService。 MyApp.WebService is a WCF service library.
MyApp.WebService是一个WCF服务库。
I want to use some utility functions from MyApp.Domain. 我想使用MyApp.Domain中的一些实用程序函数。 So in MyApp.WebService, I added a reference to MyApp.Domain.
所以在MyApp.WebService中,我添加了对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?) 命名空间“MyApp”中不存在类型或命名空间名称“Domain”(您是否缺少程序集引用?)
at using MyApp.Domain.Utility;
在
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...
如果没有得到它,请确保两者都具有相同的设置32对64位...
GL GL
Remove WCF Service project from Solution and build solution. 从解决方案和构建解决方案中删除WCF服务项目。 After building solution, add WCF project again.
构建解决方案后,再次添加WCF项目。 Issue will be resolved.
问题将得到解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.