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

NU1701: Package 'Unity3D.SDK 2020.1.15.1' was restored using NETFramework...

Discussion in 'Experimental Scripting Previews' started by xshadowmintx, Dec 2, 2020.

  1. xshadowmintx

    xshadowmintx

    Joined:
    Nov 4, 2016
    Posts:
    47
    I get the following warning when trying to install the Unity3D.SDK package:

    Seems odd; shouldn't it be targeting netstandard now?

    (This is, obviously, trying to build a package externally without using the unity editor, which can be imported later, but can benefit from the vastly better dotnet tooling that exists now)

    Repro:

    Code (csharp):
    1. dotnet new classlib --name TestUnity
    2. dotnet add TestUnity package Unity3D.SDK
    3.  
    4.   Determining projects to restore...
    5.   Writing /var/folders/xx/s2hnzbrj3yn4hp1bg8q9gb_m0000gn/T/tmpyP6wvH.tmp
    6. info : Adding PackageReference for package 'Unity3D.SDK' into project '/Users/doug/dev/now/tmp/TestUnity/TestUnity.csproj'.
    7. info :   GET https://api.nuget.org/v3/registration5-gz-semver2/unity3d.sdk/index.json
    8. info :   OK https://api.nuget.org/v3/registration5-gz-semver2/unity3d.sdk/index.json 869ms
    9. info : Restoring packages for /Users/doug/dev/now/tmp/TestUnity/TestUnity.csproj...
    10. warn : NU1701: Package 'Unity3D.SDK 2020.1.15.1' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project.
    11. info : Package 'Unity3D.SDK' is compatible with all the specified frameworks in project '/Users/doug/dev/now/tmp/TestUnity/TestUnity.csproj'.
    12. info : PackageReference for package 'Unity3D.SDK' version '2020.1.15.1' added to file '/Users/doug/dev/now/tmp/TestUnity/TestUnity.csproj'.
    13. info : Committing restore...
    14. info : Writing assets file to disk. Path: /Users/doug/dev/now/tmp/TestUnity/obj/project.assets.json
    15. log  : Restored /Users/doug/dev/now/tmp/TestUnity/TestUnity.csproj (in 235 ms).
     
    Last edited: Dec 3, 2020
  2. Huszky

    Huszky

    Joined:
    Mar 25, 2018
    Posts:
    109
    The Unity3D.SDK package on nuget, as far as I know is not produced by unity, and it's just puts the assemblies from the installed unity editor to nuget. Those DLL-s are still targeting .net framewok.