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

相关推荐
ysn111115 小时前
Unity合批实战
unity·游戏引擎
警醒与鞭策6 小时前
大模型对比
unity·性能优化·c#·游戏引擎·cursor
WarPigs7 小时前
switch和硬编码字典的等效性
unity·c#
没事写写笔记7 小时前
UniTask
unity
秦奈8 小时前
Unity复习学习笔记(八):动画、模型与寻路
笔记·学习·unity
呆呆敲代码的小Y8 小时前
【Unity工具篇】| Unity项目中如何使用LuBan插件,详细集成步骤
游戏·unity·游戏引擎·u3d·luban·免费游戏·unity工具
哈小奇17 小时前
Unity URP管线Linear空间丝绸材质
unity·游戏引擎·材质
哈小奇17 小时前
Unity URP管线Linear空间下玻璃效果
unity·游戏引擎
极客柒1 天前
Unity 大地图高性能砍树顶点动画Shader
unity·游戏引擎
avi91111 天前
UnityProfiler游戏优化-举一个简单的Editor调试
游戏·unity·游戏引擎·aigc·vibe coding·editor扩展