错误如下:

Unhandled Exception: System.TypeLoadException: Could not load type 'System.ComponentModel.InitializationEventAttribute' from assembly 'System.Windows.Forms'.

at (wrapper managed-to-native) System.MonoCustomAttrs:GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool)

at System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType) [0x00000] in <filename unknown>:0

at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0

at System.MonoType.GetCustomAttributes (System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0

at Mono.CSharp.AttributeTester.GetObsoleteAttribute (System.Type type) [0x00000] in <filename unknown>:0

at Mono.CSharp.Expression.ResolveAsTypeTerminal (IMemberContext ec, Boolean silent) [0x00000] in <filename unknown>:0

at Mono.CSharp.Expression.ResolveAsContextualType (IMemberContext rc, Boolean silent) [0x00000] in <filename unknown>:0

at Mono.CSharp.LocalInfo.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0

at Mono.CSharp.Block.ResolveMeta (Mono.CSharp.BlockContext ec, Int32 offset) [0x00000] in <filename unknown>:0

at Mono.CSharp.ToplevelBlock.ResolveMeta (Mono.CSharp.BlockContext ec, Mono.CSharp.ParametersCompiled ip) [0x00000] in <filename unknown>:0

at Mono.CSharp.ToplevelBlock.Resolve (Mono.CSharp.FlowBranching parent, Mono.CSharp.BlockContext rc, Mono.CSharp.ParametersCompiled ip, IMethodData md) [0x00000] in <filename unknown>:0

Internal compiler error at Assets/VLC for Unity/Scripts/PlayVLC.cs(241,21):: exception caught while emitting MethodBuilder [PlayVLC::GetCurrentMonitorDesktopResolution]
The class System.Runtime.InteropServices.StandardOleMarshalObject could not be loaded, used in System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
The class System.Windows.Forms.Control could not be loaded, used in System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicK

因为 Mono 平台支持 .net 3.5,所以只能使用 NET2.0 的 newtonsoft.json.dll导致了此问题。

解决办法:

Unity 菜单 Edit->Project Settings->Player, 在 Player 设置里选择 Api Comatibility Level 从 .NET 2.0 Subset 改为 .NET 2.0。

unity中导入插件时报错处理办法的更多相关文章

  1. python3中启动 uiautomator2viewer时报错解决办法

    事先说明:我电脑里同时了安装了 python2和python3,启动对应版本时分别带上版本号,如何设置共存请参考:python2与python3共存 打开命令窗口,启动weditor : python ...

  2. c#保存datagridview中的数据时报错 “动态SQL生成失败。找不到关键信息”

    ilovejinglei 原文 C#中保存datagridview中的数据时报错"动态SQL生成失败.找不到关键信息" 问题描述     相关代码 using System; us ...

  3. Aasible中cryptography兼容性报错解决办法

    Aasible中cryptography兼容性报错解决办法 1 Ansible中使用ansible --version查看版本,报错信息如下: ERROR! Unexpected Exception, ...

  4. Android学习:导入工程时报错The import android cannot be resolved

    今天在导入别人的工程时,出现了一个这个问题The import android cannot be resolved 就是找不到import android.support.v7.app.Action ...

  5. VMware导入OVF时报错(未能部署OVF包用户取消了任务的解决办法)

    阅读目录: 1.问题 2.原因 3.解决方案 问题:部署OVF模版的时候报错“用户取消了任务” 原因:导出ovf模板时,虚拟CD-ROM的选项要选[客户端设备],否则导入时报错“用户取消了任务” 解决 ...

  6. SpringBoot 导入插件报错 Cannot resolve plugin org.springframework.boot:spring-boot-maven-plugin:2.4.1

    使用 maven 导入插件的时候报错: Cannot resolve plugin org.springframework.boot:spring-boot-maven-plugin:2.4.1 我的 ...

  7. Zabbix导入数据库时报错

    导入mysql数据库时报错: ERROR 1046 (3D000) at line 1: No database selected 解决办法:1.备份原来的sql文件2. yum -y install ...

  8. AndroidStudio中导入SlidingMenu报错解决方案

    ----------------------------------------------------------------------------------------------[版权申明: ...

  9. windows中使用django时报错:A server error occurred. Please contact the administrator.

    这是因为在视图函数中使用了get函数,获取了不存在的数据例如:数据库中不存在一条name为hello1的数据,使用如下语句访问message = Message.objects.get(name='h ...

随机推荐

  1. Android JNI 数组操作

    JNI 中有两种数组操作,基础数据类型数组和对象数组,JNI 对待基础数据类型数组和对象数组是不一样的. 基本数据类型数组 对于基本数据类型数组,JNI 都有和 Java 相对应的结构,在使用起来和基 ...

  2. cocos2dx 3.x 集成protobuf

    vs2013+cocos2dx 3.13.1 这篇博文是集成Lua版本的protobuf,集成C++版本的过程也可参考. 主要参考博文地址<cocos2dx 3.x C++搭建protobuf环 ...

  3. SPOJ 刷题记录

    按点赞数降序 297 二分 #include<bits/stdc++.h> using namespace std; #define fi first #define se second ...

  4. Windows Updateエラー 80072EE2

    遗憾的是,下面的做完了,还是没用! 然后有试了把防火墙打开(原来是关闭),IE的代理也是手动入力(原来是自动寻找). 竟然成了. Windows ファイアウォールはこのバージョンの Windows に ...

  5. 带参数EXE

    有时候我们需要让软件带参数运行,使用参数控制软件的部分行为, C#默认窗口应用是不带参数的,不过在Main函数的参数手动加上就可以得到参数了. 举例如下: /// <summary> // ...

  6. 解释变量(Explanatory Variable)

    转自:http://www.statisticshowto.com/explanatory-variable/ What is an Explanatory Variable? An explanat ...

  7. English trip EM2-PE-6A Family Relationship Teacher:Taylor

    课上内容(Lesson) What's your name? Where is your hometown?  你的家乡是哪里? Where do you come from?    你从哪里来?  ...

  8. a gcc 4.2.4 bug(被stos指令累加后%edi作为参数的)

    a gcc 4.2.4 bug(被stos指令累加后%edi作为参数的) * * Ok, now we can initialize the rest of the tty devices and c ...

  9. PHP单例模式实例,连接数据库对类的引用

    <?php//单例模式连接数据库class pzhang{ static private $instance; private static $config; private $dbase = ...

  10. http认证方式,工程部分实现

    学习过程中,被boss批评,要求去复习http协议,因此找了相关资料做成一个系列:对于http认证方式不清楚的可以参考我的上一篇文章 http认证方式https://www.cnblogs.com/j ...