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
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Any word on NuGet Support?

Discussion in 'Experimental Scripting Previews' started by MechUnit5, Oct 16, 2016.

  1. MechUnit5

    MechUnit5

    Joined:
    Jan 8, 2015
    Posts:
    1
    Now that's Unity's a part of the .NET Foundation and it's getting a much needed compiler update, is there any word on getting NuGet packages to work with Unity? Currently Unity regenerates the project and wipes out any packages I've added. This has been a pain because there's a lot of really good official packages available, such as Google's GData, which lets you tie into their services like Google Sheets.

    This blog post (http://www.what-could-possibly-go-wrong.com/unity-and-nuget/) presents a solution, but it'd be really nice to have this out of the box. If this is the preferred way to do it, then it could be worth it to have an official tutorial walkthrough like the Plugins tutorial (https://unity3d.com/learn/tutorials/topics/scripting/writing-plugins).
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    The biggest issue holding us back from NuGet support is Unity's old version of .NET. Once we complete the .NET upgrade and get to latest version of the class libraries, then we will consider supporting NuGet, although it's not something we've looked at seriously yet, so there may be issues we don't fully understand.
     
  3. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    I'm also looking forward to use NuGet.
     
  4. GlitchEnzo2

    GlitchEnzo2

    Joined:
    Nov 15, 2012
    Posts:
    5
  5. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,157
    A year already and still no clues for direct support in unity
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Looks like a pretty solid clue to me. Lots of info about the net upgrade is available, it's in progress.
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    We need to complete the .NET runtime upgrade before we can consider nuget support. Although it might not be something that we ship from Unity. It should be possible to support nuget as a editor plugin, and it looks like the work from @GlitchEnzo2 is pretty awesome. I would recommend giving that a try.
     
  8. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,157
    I think now we have unity 2018 the true roslyn was included. Any problem for nuget support?
     
    Shooter9688 likes this.
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Yes, we still need to support the .NET 3.5 scripting runtime, so we're not ready to tackle nuget support yet. I don't think we will consider that until only the .NET 4.x scripting runtime is supported. Even then I don't know that we will ship nuget support built into Unity.

    I do believe that nuget support could be done with Editor scripts outside of Unity itself. There is at least one asset store package for this: https://assetstore.unity.com/packages/tools/utilities/nuget-for-unity-104640

    I've not used it myself, but it is probably worth a look.
     
  10. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,157
    Is it possible to allow nuget support only when the project is dotnet 4.x and just remove the menu for dotnet 3.5?
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Yes, that is probably possible, but I'm not sure about all of the dragons that might be involved.
     
    Thaina likes this.
  12. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,157
    I wish we could have that as experimental for 2018.3 or .4
     
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    We're not working on this at the moment, so it won't even be experimental in 2018.3 or 2018.4. I'd recommend one of the asset store package solutions for nuget support now.
     
  14. Mario-Lucassen

    Mario-Lucassen

    Joined:
    May 20, 2019
    Posts:
    1
    Any news on this? Since I want to use several nugets like System.Memory and System.IO.Pipelines, I could really use NuGet support about now.
     
    DrummerB and Qbit86 like this.
  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    We don't have any plans to start Nuget support soon. So I would look into other options.
     
  16. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,157
    Now we have dotnet 5 in our system. Do we have any progress on direct support for nuget in unity?
     
  17. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    I don't think there is any progress on NuGet support. Note that Unity does not have .NET 5 support yet either.