我想问一下 unity 添加 DLL 为什么会失效

时间蜕变 2016-11-08 05:45:17
我将DLL 放入到 unity Assert/Plugins/ 文件夹下面了, 添加引用的时候 弹出警告

1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3258: The primary reference "CLRDLL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.

1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3258: The primary reference "CLRDLL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.

1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3258: The primary reference "CLRDLL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.

1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3258: The primary reference "CLRDLL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "3.5.0.0" in the current target framework.

1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3258: The primary reference "CLRDLL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Data.SqlXml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.

1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3268: The primary reference "CLRDLL" could not be resolved because it has an indirect dependency on the framework assembly "System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5". To resolve this problem, either remove the reference "CLRDLL" or retarget your application to a framework version which contains "System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

...全文
813 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
时间蜕变 2016-11-14
  • 打赏
  • 举报
回复
引用 8 楼 zq1564171310 的回复:
你用的unity什么版本?
Unity 5.4.1f1 (64-bit) 应该算最新版本了吧
zq1564171310 2016-11-11
  • 打赏
  • 举报
回复
你用的unity什么版本?
时间蜕变 2016-11-11
  • 打赏
  • 举报
回复
引用 5 楼 zq1564171310 的回复:
在解决方案里面,选中项目,右键属性,会有target framework
谢谢你哈~
zq1564171310 2016-11-09
  • 打赏
  • 举报
回复
缺少依赖库,你的dll的目标framework是哪个版本?你现在的framework哪个版本?确认下看看
时间蜕变 2016-11-09
  • 打赏
  • 举报
回复
引用 5 楼 zq1564171310 的回复:
在解决方案里面,选中项目,右键属性,会有target framework
UNITY本身的版本是v3.5 4.0直接警告了 但是 warning MSB3258: The primary reference "DLLLLLLLL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. 这个问题一直没解决了
zq1564171310 2016-11-09
  • 打赏
  • 举报
回复
在解决方案里面,选中项目,右键属性,会有target framework
时间蜕变 2016-11-09
  • 打赏
  • 举报
回复
引用 3 楼 zq1564171310 的回复:
把dll打包成framework4.0试试,以前我遇到过,改了dll的framework4.0似乎就没事了
怎么打包成4.0版本啊。。是新建个项目吗?
zq1564171310 2016-11-09
  • 打赏
  • 举报
回复
把dll打包成framework4.0试试,以前我遇到过,改了dll的framework4.0似乎就没事了
时间蜕变 2016-11-09
  • 打赏
  • 举报
回复
引用 1 楼 zq1564171310 的回复:
缺少依赖库,你的dll的目标framework是哪个版本?你现在的framework哪个版本?确认下看看
Unity的 FrameWork 和我DLL的FrameWork 都改成 v3.5了 还是有问题

2,537

社区成员

发帖
与我相关
我的任务
社区描述
Unity3D相关内容讨论专区
游戏unity 技术论坛(原bbs)
社区管理员
  • Unity3D
  • 芝麻粒儿
  • 「已注销」
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

Unity3D社区公告:

  1. 社区致力于解决各种Unity3D相关的“疑难杂症”。
  2. 社区不允许发布与Unity3D或相关技术无关内容。
  3. 社区版主邀请各位一道为打造优秀社区不懈努力。

试试用AI创作助手写篇文章吧