Search Unity

Force Unity to target .NET Standard 2.0

Discussion in 'Asset Bundles' started by DrMaxP, May 30, 2019.

  1. DrMaxP

    DrMaxP

    Joined:
    Sep 18, 2018
    Posts:
    29
    I am upgrading a Unity package to support .NET Standard 2.0. This work is scheduled before we upgrade our supported version of Unity to 2019.X. Our CI system is currently failing to run our unit tests because the version of Unity we currently support does not default to .NET 2.0. It is my assumption that it's trying to run the tests based on the default project settings and fails when importing the asset that requires .NET Standard 2.0.

    Is there a way of forcing the test system or Unity to switch the project settings to target .NET Standard 2.0 at the API compatibility level? Is there a pattern that enables assets to specify their target or can it be set based on a command line argument?