Unity 2017.10f3 .Net 4.6 目标问题 [英] Unity 2017.10f3 .Net 4.6 target issue

查看:36
本文介绍了Unity 2017.10f3 .Net 4.6 目标问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已按照文档将播放器设置 API 更新为 4.6.但我的项目仍然以 3.5 为目标.

我也尝试手动将 csproj 更新到 4.6但是在打开 unity 后,它再次将其覆盖为 3.5.

请注意,我已将 Visual Studio Tools For Unity 更新到最新版本 (3.1.0.0)

有什么我遗漏的吗?这是一个已知的错误?如果是这样,是否有解决方法?

解决方案

您必须从编辑器本身启用此功能.顺便说一句,您现在可以下载不再处于测试模式的最新版本.

转到编辑 --> 项目设置 --> 播放器 --> 其他设置 --> 配置 --> 脚本运行时版本 --> .NET 4.6 等效项

然后

转到编辑 --> 项目设置 --> 播放器 --> 其他设置 --> 配置 --> Api 兼容性级别 --> .NET 4.6

这个菜单可能已经改变了,但它曾经在那里,我希望它在那里或在那个菜单下.

您必须重新启动 Unity Editor,然后重新启动 Visual Studio 才能使这些更改生效.

.NET 4.6 Equivalent"菜单已更改为Experimental (.Net 4.6 Equivalent)".

如果在重新启动 Unity 和 Visual Studio 后,但版本仍然没有更改,请重新安装 Unity 和 Visual Studio,并确保您运行的是最新版本的 Visual Studio.>

在重新安装 Visual Studio 之前 - 请确保您安装了最新的更新,如果不是请先尝试更新.

I've updated the player settings API to be 4.6 as documented. But my project is still targeting 3.5.

I also tried to manually update the csproj to 4.6 But after unity was opened it overrided it again to 3.5.

Notice that I've update the Visual Studio Tools For Unity to the latest version (3.1.0.0)

Anything I'm missing? Is this a known bug? If so, is there a workaround?

解决方案

You have to enable this from the Editor itself. By the way, you can now download the latest version which is no longer in beta mode.

Go to Edit --> Project Settings --> Player --> Other Settings --> Configuration --> Scripting Runtime Version --> .NET 4.6 Equivalent

then

Go to Edit --> Project Settings --> Player --> Other Settings --> Configuration --> Api Compatibility Level --> .NET 4.6

This menu may have changed but this where it used to be and I expect it to be there or under that menu.

EDIT:

You must restart Unity Editor then restart Visual Studio to make these changes to take effect.

".NET 4.6 Equivalent" Menu has changed to "Experimental (.Net 4.6 Equivalent)".

If after restarting both Unity and Visual Studio but the version is still not changing, re-install both Unity and Visual Studio and make sure that you are running the latest version of Visual Studio.

Before re-installing visual studio - make sure you installed the latest update, if not try to update first.

这篇关于Unity 2017.10f3 .Net 4.6 目标问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆