Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
795 views
in Technique[技术] by (71.8m points)

unity3d - Unity 2017.10f3 .Net 4.6 target issue

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...