Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Can't change existing project to .NET 4.6 in Unity 2017.4.0f1 (64-bit)

Discussion in 'Experimental Scripting Previews' started by emebane, Apr 3, 2018.

  1. emebane

    emebane

    Joined:
    Oct 4, 2013
    Posts:
    5
    Are there any known problems with switching a project to .NET 4.6 Experimental with Unity 2017.4.0f1 (64-bit)? I deleted all folders except Assets and Project Settings from a 2017.2.1 project, then opened the project in Unity 2017.4.0f1. I have Windows UWP selected as the Build target. If I switch to .NET 4.6 and allow the Editor to restart, I return to the settings and find that they are still 3.5.

    I am able to create a new project from scratch and make the switch.

    I also tried switching to IL2CPP, saving, closing the project and relaunching Unity before making the .NET 4.6 switch -- no luck.
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    We don't have any known issues like this. To be clear, which exact setting are you changing in the GUI?
     
  3. emebane

    emebane

    Joined:
    Oct 4, 2013
    Posts:
    5
    Settings for UWP > Other Settings > Configuration > Scripting Runtime Version is changed from Stable (.NET 3.5 Equivalent) to Experimental (.NET 4.6 Equivalent).

    Other settings are:
    Scripting Backend is .NET
    Api Compatibility Level is .NET 4.6.

    When I make the change to Scripting Runtime Version the dialog appears asking to restart Unity. Once the restart is complete, I check the settings and the Scripting Runtime Version is back to 3.5.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    This certainly sounds like a bug, as this should work to switch the scripting runtime version. Can you submit a bug report with the project that causes this?
     
  5. emebane

    emebane

    Joined:
    Oct 4, 2013
    Posts:
    5
    It is a problem with several versions of Unity, including 2018. I've submitted a bug: 1022273_2mag5g68u1aro7fb

    There is a solution:
    Create a new project
    Switch the Scripting Runtime to .NET Scripting Runtime Experimental (.NET 4.6 Equivalent)
    Save and close new project
    Replace the Assets folder in the new project with the Assets folder from the old project
    Delete all folders except Assets and Project Settings
    Re-launch Unity and open the new project (which now has a mix of the old Assets folder and the new Project Settings folder).
    Confirm that the .NET Scripting Runtime setting is Experimental (.NET 4.6 Equivalent)
     
    JoshPeterson likes this.
  6. JoseGallardoSimumak

    JoseGallardoSimumak

    Joined:
    Aug 30, 2017
    Posts:
    1
    Here is another solution, that works for me:

    Create a new project
    Switch the Scripting Runtime to .NET Scripting Runtime Experimental (.NET 4.6 Equivalent)
    Unity will ask for restart.
    After Restart your new project is setted up to 4.6
    Open your previous project, and "Magic", now is also setted up to 4.6