惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Security @ Cisco Blogs
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
腾讯CDC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
F
Full Disclosure
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Engineering at Meta
Engineering at Meta
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Threatpost
I
Intezer
V2EX - 技术
V2EX - 技术
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Hacker News
The Hacker News
小众软件
小众软件
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
N
News | PayPal Newsroom
MyScale Blog
MyScale Blog
AI
AI
Vercel News
Vercel News
Spread Privacy
Spread Privacy
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
Schneier on Security
Schneier on Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
Help Net Security
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
L
LINUX DO - 热门话题
U
Unit 42
L
LangChain Blog
Recent Announcements
Recent Announcements

博客园 - LiuLei

[转]oracle RAC 日志体系 [转]Oracle10g RAC crsctl&srvctl [转]oracle v$sqlarea 分析SQL语句使用资源情况 SQL2008数据库还原后显示受限制用户解决办法 [转].net 连接oracle的几种方式 [转]动态交叉表 二维表 [转]日常养生:按摩七大养生穴位 让你百毒不侵! [转]两个长寿穴合谷与内关 [原]C#错误解决-"Window无法访问指定设备,路径或文件..." [转]WeifenLuo.WinFormsUI.Docking——DockPanel的一点点改进 [原]升级sqlserver2008 r2的错误:perf-ReportServer-rsctr.dll被使用 [原]安装SQL SERVER2008错误:Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings [原]卸载mssqlserver2008R2并重新安装 [原] sqlserver2008 还原数据库出现错误:3154 [转]【C#】Color颜色对照表 [转]关于本博客数据仓库方面的原创文章汇总 [解决]CS0016: 未能写入输出文件...\App_Web_default.aspx.cdcab7d2.zii776dc.dll”--"拒绝访问。 " 解决方法 - LiuLei [解决]Windows 7 IIS (HTTP Error 500.21 - Internal Server Error)解决 [解决]无法识别的属性“targetFramework”。请注意属性名称区分大小写。错误解决办法
[转]VS2010 项目引用了DLL文件,也写了Using,但是编译时提示:未能找到类型或命名空间名称
LiuLei · 2013-04-23 · via 博客园 - LiuLei

我在写C#的时候也出现了这个问题,google了下之后,找到如下解决方法:

-----------------------------------------------------------

昨天写了一个很小的winform程序,其中引用了自己写的两个dll文件。

本来认为轻松搞定,结果一编译居然提示:未能找到类型或命名空间名称。。。。。

于是删掉两个dll重新引用,再编译结果依旧!很是郁闷。

后来经过调查,终于发现了解决方法:

在项目上点右键-->属性-->应用程序-->目标框架-->修改为.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.

不过也因为如此,当在 Visual Studio 2010 建立新项目时,如果发现 [添加引用] 中没有列出原本应该列出的组件或者引用的其他程序集,在代码中的调用一直提示找不到名字空间时,可以先检查是否是项目的 target framework 设成了 .NET 4.0 Client Profile (例如 System.Web.dll 就不在 .NET 4.0 Client Profile 套件中),若是改成.NET Framework 4就OK了。