Search Unity

"dotnet" 4.x setting not carried over to IOS builds

Discussion in 'Unity Build Automation' started by pradf4i, Nov 24, 2020.

  1. pradf4i

    pradf4i

    Joined:
    Nov 7, 2017
    Posts:
    39
    My project is targeted for Android in my local machine and am uploading to Unity collaborate. I have manually changed the .net version in player settings to use the 4.x version.

    When I kick off for IOS, the logs show that Unity Cloud build is trying to use the default .net version instead of the 4.x. Is there a workaround or setting I can use?

    Any help would be most appreciated. Thanks.

    "
    : \cb8 [Unity] Assets/Databox/Core/Serializers/OdinSerializer/Utilities/Misc/EmitUtilities.cs(20,8): \cf2 \cb9 error\cf4 \cb8 CS1029: #error: 'Odin Inspector is incapable of compiling source code against the .NET Standard 2.0 API surface. You can change the API Compatibility Level in the Player settings.'\cb2 \
    "
     

    Attached Files:

  2. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,089
    Some of the platforms have their own custom .NET setting that you can override so perhaps it's not been set up specifically for iOS. If you look in "ProjectSettings\ProjectSettings.asset" and search for 'apiCompatibilityLevelPerPlatform' you can see the .NET level for each target.

    For iOS you can set it to 3 if you want to use .NET 4

    For example:

    upload_2020-11-24_16-49-45.png

    p.s. You should also be able to do this via the normal Player Settings editor menu for iOS
     

    Attached Files:

    victorw and pradf4i like this.
  3. pradf4i

    pradf4i

    Joined:
    Nov 7, 2017
    Posts:
    39
    Thanks @tonemcbride . This worked.
    Appreciate the help!