unity 报错 Loading script assembly "Assets/Plugins/System.Net.Http.dll" failed!的解决方案

unity2017.4.2f2

由于脚本中要使用类 HttpClient,但using System.Net.Http;时发现时灰色的 将playerSetting做如下修改。

unity 报错 Loading script assembly "Assets/Plugins/System.Net.Http.dll" failed!的解决方案

在Assets文件夹下新建mcs.rcp文件,里面写上-r:System.Net.Http.dll ,这样unity就能引用到.Net 4.6的动态链接库了。

详情请查看https://docs.unity3d.com/es/2018.1/Manual/dotnetProfileAssemblies.html

为防止地址失效,页面如下unity 报错 Loading script assembly "Assets/Plugins/System.Net.Http.dll" failed!的解决方案