Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

[2018.3.0b2] PlayerSettings.apiCompatibilityLevel is reset when upgrading Project

Discussion in '2018.3 Beta' started by Korbinian, Sep 21, 2018.

  1. Korbinian

    Korbinian

    Joined:
    Jun 27, 2013
    Posts:
    8
    The apiCompatibilityLevel is reset to NET_Standard_2_0 when upgrading the project to 2018.3.0b2.

    Repro:
    - Create new project with 2018.2.6f1
    - Set Scripting Runtime Version to .NET 4.x Equivalent (in Menu -> Edit -> Project Settings -> Player)
    - Perform the editor restart. Confirm that the Api Compatibility Level has changed to .NET 4.x as well
    - Close Editor, open the Project with 2018.3.0b2, confirm the upgrade warning
    -> The api compatibility level has reset to .NET Standard 2.0 (in Menu -> Edit -> Settings -> Player)
    When saving the project, ProjectSettings.asset accordingly has changed:
    - apiCompatibilityLevel: 3
    + apiCompatibilityLevel: 6
     
    LeonhardP likes this.
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,500
    Can you submit a bug report with this workflow? We will correct it.
     
  3. Korbinian

    Korbinian

    Joined:
    Jun 27, 2013
    Posts:
    8
    Done: 1083445

    Also:
    - The "apiCompatibilityLevel: 3" in my ProjectSettings seems to be ignored anyway? I need to set the apiCompatibilityLevelPerPlatform now (which is the default that happens in the UI), but a problem for upgrading.
    - When I *don't* have an apiCompatibilityLevelPerPlatform set then the build is getting the DLLs from Editor\Data\MonoBleedingEdge\lib\mono\unityaot -- note that I'm not creating an IL2CPP build. When I set the platform specific setting I get the correct DLLs from monojit instead. That's how I found the problems initially, we were suddenly getting ReflectionTypeLoadException when getting the types from System.dll (since it loads System.Configuration.dll, and the aot version is only a reference assembly)

    I can create another bug report with that, doesn't seem directly related.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,500
    Yes, please create another bug report. It looks like Unity is using the wrong .NET profile implementation.
     
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,051
    Thanks a lot Korbinian,
    This is really helpful!
     
  6. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    Switching to .NET 4.x broke my project for standalone builds on Mac. They crash immediately, regardless of being compiled with Mono or ILCP2
     
  7. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,051
    Any chance we could get a bug report + repro for that?
     
  8. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    I left a note for Josh Peterson to contact me if he needs anything, before writing the above.

    It crashes so fast there's no report come up. Just brutal. I think he probably knows about it, as I haven't heard from him.
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,500
    @Deeeds

    Does the editor or the player crash? It sounds like it might be the player. If so, you should able to submit a bug report via the editor and include the project used to build the player. Then we can build the player and see the problem ourselves.
     
  10. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    The project is a myriad of messes, and I've moved to a leaner version, and backed off on builds so I can continue working...

    I could, but it's time I don't have... so I've gone back to Mono, which builds FAST. Shockingly so.