mrward/monodevelop-nuget-addin

Unable to install nuget addin in Monodevelop Unity 5.9.6

plourenco opened this issue · 6 comments

Hello,

I tried to install the addin, but I get the following errors:

According to the page, it says monodevelop 5+ already comes with nuget, but I'm unable to find it in Add > Add Packages.

I'm until now, unable to find a way to install a nuget package through Monodevelop on Unity.

Thanks in advance.

There was some discussion about this on another issue:

mrward/monodevelop-nuget-extensions#2 (comment)

A workaround there was to get a copy of Xamarin Studio and copy the NuGet addin over to MonoDevelop. However you would need to determine the version of MonoDevelop that is being used by Unity.

Thanks for you answer.

If I try using another editor in the Unity project, such as Visual Studio, I have the option to add NuGet Packages, however I cannot click it.

Is there a way to change this?

My guess would be that you have the solution selected and none of your projects contain any NuGet packages. If you select the project or double click the Packages folder in the project then that should open the Add Packages dialog.

Yes, it doesn't contain any NuGet package. I noticed Unity projects created by default, in Visual Studio, do not have any Packages folder. It's just a folder with assets (scripts).
I tried creating it, compare it to a fresh project, but I'm unsure how to restore the default packages folder. And therefore, how to install a package.

Thanks for your time, I know I'm getting a bit off-topic but it's been a few hours of research since I'm stuck in this.

The Packages folder should be available if the project is a .NET project. At a lower level that means the project type has to be an instance of the DotNetProject class. Not sure what Unity projects - possibly they are not using that class.

After a few more hours after looking at it, I solved the problem!
Thank you for your time.

For anyone else my solution was:

  • Download the nuGet packages manually from the NuGet Gallery website (.nupkg files)
  • Change the file extension to zip
  • Open the zip and go into /lib/ folder, copy all .dll
  • Create a folder called 'Plugins' in Unity and place all .dll's there