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版本比较新 支持)

相关推荐
Artistation Game2 小时前
九、怪物行为逻辑
游戏·unity·游戏引擎
百里香酚兰2 小时前
【AI学习笔记】基于Unity+DeepSeek开发的一些BUG记录&解决方案
人工智能·学习·unity·大模型·deepseek
dangoxiba5 小时前
[Unity Demo]从零开始制作空洞骑士Hollow Knight第十三集:制作小骑士的接触地刺复活机制以及完善地图的可交互对象
游戏·unity·visualstudio·c#·游戏引擎
先生沉默先1 天前
使用Materialize制作unity的贴图,Materialize的简单教程,Materialize学习日志
学习·unity·贴图
十画_8241 天前
Visual Studio 小技巧记录
unity·visual studio
red_redemption1 天前
cpp,git,unity学习
git·unity·游戏引擎
tealcwu1 天前
【Unity踩坑】Unity更新Google Play结算库
unity·游戏引擎
先生沉默先1 天前
unity 默认渲染管线材质球的材质通道,材质球的材质通道
unity·游戏引擎·材质
白鹭float.1 天前
【Unity AI】基于 WebSocket 和 讯飞星火大模型
人工智能·websocket·unity
一个程序员(●—●)1 天前
Unity各个操作功能+基本游戏物体创建与编辑+Unity场景概念及文件导入导出
unity·游戏引擎