VS2010 项目引用了微软企业库,但是编译时提示:未能找到类型或命名空间名称

时间:2023-03-08 22:22:45

我写的是控制台程序

是在引用我自己写的库 和 Microsoft.Practices.EnterpriseLibrary 时出现的问题

经过分析,和百度 找到了修改方法

打开  项目属性-->应用程序-->目标框架-->修改为.NET Framework 4。

不知道为啥我的设置是.NET Framework 4 Client Profile

以下是MSDN给出的提示:

If you are targeting the .NET Framework 4 Client Profile, you cannot reference an assembly that is not in the .NET Framework 4 Client Profile. Instead you must target the .NET Framework 4.