Unity3d 类型或命名空间名称`Xml';命名空间“System.Security.Cryptography';
我必须用一个Unity3d 类型或命名空间名称`Xml';命名空间“System.Security.Cryptography';,unity3d,unityscript,Unity3d,Unityscript,我必须用一个 Using System.Security; System.Security.Cryptography.Xml.SignedXml signedXml = new System.Security.Cryptography.Xml.SignedXml(lic); First Unity/VS抱怨说 VS>错误11中不存在类型或命名空间名称Xml' 名称空间System.Security.Cryptography'。你是不是错过了一场比赛 汇编参考 所以我在VisualStudio中
Using System.Security;
System.Security.Cryptography.Xml.SignedXml signedXml = new System.Security.Cryptography.Xml.SignedXml(lic);
First Unity/VS抱怨说
VS>错误11中不存在类型或命名空间名称Xml'
名称空间
System.Security.Cryptography'。你是不是错过了一场比赛
汇编参考
所以我在VisualStudio中添加了对System.Security的引用(C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Security.dll)…但Unity一直在抱怨这一点
错误CS0234:中不存在类型或命名空间名称Xml'
命名空间
System.Security.Cryptography'。你错过一个集会了吗
推荐人
然后我试图直接复制资产文件夹中的'System.Security.dll',但仍然是相同的消息
请问我做错了什么?必须做什么?
非常感谢 unity的默认
.Net 2.0子集
API中排除了大部分System.Security.Cryptography
命名空间。很可能.Xml
也被剥离了。因此,请执行以下操作之一:
播放器设置
。在inspector中查找API兼容性级别
,默认设置为.Net 2.0子集
。将其更改为.NET2.0
,其中包括先前剥离的其余类/名称空间子集
API中排除的内容:
很抱歉,我找不到此文档的当前版本
编辑:
正如@user2737085所建议的,您还必须将mcs.rsp
文件添加到您的Assets
文件夹中mcs.rsp
应为包含以下行的文本文件:
-r:System.Security.dll
妮卡,非常感谢你的帮助!我已经按照你的建议做了,而且很有效。。。但是我必须在项目资产文件夹中添加一个包含'-r:System.Security.dll'的'mcs.rsp'文件!再次感谢@user2737085酷,我已经编辑了未来迷失灵魂的答案