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

相关推荐
qq_3994071816 小时前
2025年Unity国际版下载及安装
unity·游戏引擎
鹿野素材屋18 小时前
Unity做出果冻胸部的效果
unity·游戏引擎
两水先木示18 小时前
【Unity】坐标转换(屏幕坐标、世界坐标、UI坐标)
unity·游戏引擎·空间转换
老朱佩琪!21 小时前
Unity模板方法模式
unity·游戏引擎·模板方法模式
又来0771 天前
Unity手柄按键映射表
unity·游戏引擎
dzj20211 天前
Unity的旁门左道用法(科学计算):用shader调用GPU做k线MA5的计算——DuckDB + Compute Shader
unity·金融·gpu·shader·量化·compute shader
世洋Blog1 天前
Unity使用Luban的一些常用点
unity·游戏策划·luban
nnsix1 天前
Unity的dllType Native和Managed的区别
unity·游戏引擎
Clank的游戏栈2 天前
AI游戏开发全自动编程课程体系(Cursor版,支持Unity/Cocos, Laya后续支持)
人工智能·unity·游戏引擎
鹿野素材屋2 天前
技术闲聊:为什么网游会在固定时间点,刷出固定的道具?
前端·网络·unity