Unity2017升级到Unity2018在Window7上输出空异常错误问题

Unity2017升级到Unity2018在Window7上输出空异常错误问题

一、环境Window7

二、现象Unity报空异常(.NET 4.x Equivalent)

三、日志

csharp 复制代码
-----CompilerOutput:-stdout--exitcode: -2147450750--compilationhadfailure: True--outfile: Temp/Unity.TextMeshPro.dll
-----CompilerOutput:-stderr----------
Failed to load the dll from [?.], HRESULT: 0x80070057
 
The library hostfxr.dll was found, but loading it from C:\Program Files\Unity201918f1\Editor\Data\Tools\Roslyn\hostfxr.dll failed
 
  - Installing .NET Core prerequisites might help resolve this problem.
 
     http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
 
-----EndCompilerOutput---------------
- Finished compile Library/ScriptAssemblies/Unity.TextMeshPro.dll

四、解决方案

第一种解决方案

将Unity中Inspector中的Scripting Runtime Version* 更改为 .NET3.5即可,但是这种方法无法保证C#语法6.0规范。这种方案需要更改C# 6.0语法为更低级的语法。


第二种解决方案

在日志中我们能看到其实是Win7的.NET Core不支持,所以下载一个最新的.NET Core就可以解决。

https://www.microsoft.com/zh-cn/download/details.aspx?id=26764

下载完安装即可

Window10中不会存在这个问题(win10的.Net Core版本比较新 支持)

相关推荐
神码编程2 小时前
【Unity】MiniGame编辑器小游戏(十六)中国象棋局域网对战【Chinese Chess】(下)
unity·编辑器·游戏引擎·小游戏
Maddie_Mo2 小时前
Unity 联动 Trae AI 项目开发基础教学
人工智能·unity·游戏引擎
新手unity自用笔记14 小时前
unity简单新手上手动画系统讲解
unity·游戏引擎
伽蓝_游戏15 小时前
第二章:深入 Unity 资源导入管线 (Asset Import Pipeline)
游戏·unity·c#·游戏引擎·游戏程序
我寄人间雪满头丶20 小时前
Unity中对于数值游戏的大数显示
游戏·unity·游戏引擎
游乐码21 小时前
unity基础 (三)坐标系
unity·游戏引擎
qq_2052790521 小时前
Unity 避免Text组件每行开头不是字符和空格,适配不同分辨率
unity·游戏引擎
游乐码21 小时前
Unity基础(二)游戏中的角度及三角函数
游戏·unity·游戏引擎
真鬼1231 天前
Cesium、Cmake、Dotnet快捷下载
unity·游戏引擎
真鬼1231 天前
【Unity安卓】Unity 嵌入 Android Studio 完整流程
android·unity·android studio