我的解决方案有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:\Abc\Abc.Ui\viewmodels\Clientviewmodel.cs
另外,当我在文件的顶部手动输入使用时,Intelli-sense会显示“Abc.Business.etc ..”.所以Intelli感觉走在参考,但是并没有建立.
有任何想法吗 ?
解决方法
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3253: The referenced assembly “C:\Abc\Abc.Business\bin\Debug\Abc.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所有工作
再次感谢你们的时间.