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

推荐订阅源

Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
The Register - Security
The Register - Security
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
人人都是产品经理
人人都是产品经理
MyScale Blog
MyScale Blog
云风的 BLOG
云风的 BLOG
博客园_首页
U
Unit 42
T
Tailwind CSS Blog
G
GRAHAM CLULEY
F
Full Disclosure
V
Vulnerabilities – Threatpost
T
Tenable Blog
月光博客
月光博客
P
Privacy & Cybersecurity Law Blog
P
Privacy International News Feed
K
Kaspersky official blog
Scott Helme
Scott Helme
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News and Events Feed by Topic
T
The Exploit Database - CXSecurity.com
N
News and Events Feed by Topic
有赞技术团队
有赞技术团队
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
LINUX DO - 最新话题
Recorded Future
Recorded Future
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Help Net Security
Help Net Security
The GitHub Blog
The GitHub Blog
Cisco Talos Blog
Cisco Talos Blog
SecWiki News
SecWiki News
P
Proofpoint News Feed
Security Latest
Security Latest
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
罗磊的独立博客
S
Security Affairs
M
MIT News - Artificial intelligence
L
LINUX DO - 热门话题
美团技术团队
Simon Willison's Weblog
Simon Willison's Weblog
T
Threat Research - Cisco Blogs
Stack Overflow Blog
Stack Overflow Blog
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
V
Visual Studio Blog

博客园 - 阿修

Entity FrameWork 单表对多实体 让Entity Framework启动不再效验__MigrationHistory表 Entity Framework搜索指定字段解决方案 获取某年中第几个礼拜的第一天的函数 DataTable.Rows.Remove(row) 与 DataTable.Rows[i].Delete()区别 [转摘]Lucene学习总结之一:全文检索的基本原理 Lucene.net根据Sort走到了不同的类处理 VPN Connections and Default Gateways - 阿修 牛!帮EXE等执行文件压缩的工具 进程通讯的多种方式 三星I9008删除程序清单 .NET编程中的部分效率问题 质量保证漫漫谈之QA、QC、QM的关系与区别 敏捷宣言 多维角度聊聊结对编程 在Windows下编译和.NET运行MemCached Serv-U服务器中文乱码问题的解决 请小心 管理学中四件不要做的事情
Linux+Mono+WebService:CS1703: An assembly with the same identity--mscorlib
阿修 · 2013-06-27 · via 博客园 - 阿修

最近把一些东西开始往Linux迁移了,因为老系统大部分都是.NET,所以直接使用Mono,代码一般都使用MonoDevelop把代码重新编译,把一些WMI和windows DLL调用改Linux的os调用,这些都是好说,网上很多教程,但是最郁闷的关于WebService问题,把自己的dll丢过去就报下面错误,单独的ASMX文件里面写代码没问题,好奇怪。

System.Web.Compilation.CompilationException

CS1703: An assembly with the same identity `mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has already been imported. Consider removing one of the references

最后查到有个命名空间System.Globalization不能在csusing或者ASMX里面<%@ Import Namespace="System.Globalization" %>,一旦有这种写法都是上面错误斥候,你妹的,定位这问题把整个mono的文件夹翻了一遍,搞了一整天,这谁写的代码,测试太不到位,网上好多对这问题的解决方案都是绕过去走WCF,IOS上面说可以在编译设置里面勾选"do not reference mscorlib.dll",总之我是编译不通过的,因为System.Object就在这里面,是.NET的核心之核心!

所以大家如果碰到这错误,可以找下所有的CS和ASMX文件里面有System.Globalization引用,仅仅是引用,代码里面如要使用用完整命名空间即可,如:

Response.Write("dddd" + System.Globalization.StringInfo.GetNextTextElement("ABCDEFG", 1));