语境:
我的解决方案有3个项目(C#,.NET 4.0):
> Abc.Business(Dll项目)
> Abc.Test(测试项目)
> Abc.Ui(Wpf项目)
Abc.Business是我的业务逻辑.它包含实体,经理,服务等.
Abc.Test有Abc.Business的项目参考,是单元测试.他们工作得很好
> Abc.Ui有Abc.Business的项目参考
Abc.Ui无法解决所有使用Abc.Business;
错误日志显示:
Error The type or namespace name ‘Business’ does not exist in the namespace ‘Abc’ (are you missing an assembly reference?) c:AbcAbc.UiViewModelsClientViewModel.cs
另外,当我在文件的顶部手动输入使用时,Intelli-sense会显示“Abc.Business.etc ..”.所以Intelli感觉走在参考,但是并没有建立.
有任何想法吗 ?
非常感谢
Grhm和
Henk Holterman谁指出了架构解决方案.其实这不是问题,而是让我找到它.问题是框??架目标.默认情况下,Ui项目的目标是使用“客户端”配置文件的.NET 4.0 Framework.此配置文件不能引用非客户端配置文件.我发现在不够用的调试输出窗口中. (我习惯于查看错误列表)
以下是错误显示:
c:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(1360,9): warning MSB3253: The referenced assembly “C:AbcAbc.BusinessbinDebugAbc.Business.dll” could not be resolved because it has a dependency on “System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a” which is not in the currently targeted framework “.NETFramework,Version=v4.0,Profile=Client“. Please remove references to assemblies not in the targeted framework or consider retargeting your project.
我将配置文件更改为正常(无)和BOOM所有工作
再次感谢你们的时间.