monodevelop-nuget-extensions icon indicating copy to clipboard operation
monodevelop-nuget-extensions copied to clipboard

Error in Xamarin Studio 5.9

Open mteper opened this issue 9 years ago • 18 comments

XS 5.9 shipped with an updated version of NuGet, causing this error to pop when attempting to manage NuGet packages for a solution:

System.IO.FileNotFoundException: Could not load file or assembly 'NuGet.Core, Version=2.8.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'NuGet.Core, Version=2.8.1.0, Culture=neutral, PublicKeyToken=null'
  at MonoDevelop.PackageManagement.ManagePackagesHandler2.CreateViewModel () [0x00000] in <filename unknown>:0 
  at MonoDevelop.PackageManagement.ManagePackagesHandler2.Run () [0x00000] in <filename unknown>:0 

mteper avatar Apr 09 '15 23:04 mteper

Xamarin Studio 5.9 was updated to NuGet 2.8.3 so the NuGet Extensions addin version 0.6 no longer works on the Mac.

I am currently unable to publish this to the main Xamarin Studio adding repository.

For now I have uploaded a 0.6.1 version of the addin to GitHub which works with Xamarin Studio 5.9. Download the .mpack file, open the Add-in Manager and select Install from file to install the addin. You may need to restart after installing.

mrward avatar Apr 21 '15 18:04 mrward

:+1: worked like a charm, thanks!! (no need for restart)

mteper avatar Apr 21 '15 21:04 mteper

I've just updated to Xamarin Studio 5.9.3 (build 1) and 0.6.1 of the extension no longer works :cry:

jchannon avatar Jun 18 '15 14:06 jchannon

Version 0.8 should work with Xamarin Studio 5.9.3. That version been published to the main Xamarin Studio Add-in Repository (Alpha Channel).

You can also download the version 0.8 mpack directly from GitHub.

mrward avatar Jun 18 '15 15:06 mrward

Thanks! Did the trick

On 18 June 2015 at 16:11, Matt Ward [email protected] wrote:

Version 0.8 should work with Xamarin Studio 5.9.3. That version been published to the main Xamarin Studio Add-in Repository (Alpha Channel).

You can also download the version 0.8 mpack directly from GitHub https://github.com/mrward/monodevelop-addins/blob/gh-pages/5.0/MonoDevelop.PackageManagement.Extensions_0.8.mpack .

— Reply to this email directly or view it on GitHub https://github.com/mrward/monodevelop-nuget-extensions/issues/2#issuecomment-113188244 .

jchannon avatar Jun 18 '15 15:06 jchannon

Any word on when this is coming natively to XS? Seems like a pretty fundamental feature...

mteper avatar Jun 18 '15 16:06 mteper

Any particular part you would like to see included?

It is unlikely the NuGet PowerShell integration will be supported out of the box in the near future since the PowerShell implementation is incomplete.

Being able to manage packages at the solution level (i.e. being able to add, update, remove NuGet packages in multiple projects in one step) is something that I would like to see included out of the box in Xamarin Studio. But there is no word on when that will happen.

mrward avatar Jun 18 '15 16:06 mrward

Yup, that's what I was talking about (ability to manage solution-wide). Most of my solutions have over a dozen projects. Managing dependency updates one at a time via UI is both a major PITA and error-prone. Your plugin is invaluable, but seems like it really belongs in the core product.

mteper avatar Jun 18 '15 17:06 mteper

Agreed

On Thursday, 18 June 2015, Michael Teper [email protected] wrote:

Yup, that's what I was talking about (ability to manage solution-wide). Most of my solutions have over a dozen projects. Managing dependency updates one at a time via UI is both a major PITA and error-prone. Your plugin is invaluable, but seems like it really belongs in the core product.

— Reply to this email directly or view it on GitHub https://github.com/mrward/monodevelop-nuget-extensions/issues/2#issuecomment-113235359 .

jchannon avatar Jun 18 '15 18:06 jchannon

Not available anymore with XS 5.9.8

alexrainman avatar Nov 11 '15 23:11 alexrainman

@alexrainman - By not available anymore with XS 5.9.8 I am assume you mean from the addin manager. I tried to publish version 0.10 of the addin which is compatible with the stable version of Xamarin Studio to the beta channel but for some reason addins.monodevelop.com is not showing it. It only seems to be showing 0.10.1 on the alpha channel which only works with XS 5.10.

You can download 0.10 of the addin from GitHub. You can install the .mpack using the Install from file button in the Add-in Manager.

mrward avatar Nov 11 '15 23:11 mrward

This is what i did:

  1. Install mpack manually
  2. Override dlls in XS Package Content folder

By the way, the extension is there in alpha channel.

Thanks

alexrainman avatar Nov 12 '15 02:11 alexrainman

I am trying to use it in MonoDevelop Unity Version (its a custom 5.9.6) but I am not having any luck. It is asking for MonoDevelop.PackMangament,5.0. Anyone here had any luck with Nuget and Unity?

Sposito avatar Jan 09 '16 02:01 Sposito

@Sposito - Unity's version of MonoDevelop does not ship with the NuGet addin that the NuGet extensions depends on. You can see that if you open the Add-in Manager dialog.

As a quick test I downloaded the beta version of Unity's MonoDevelop and it does not include the NuGet addin.

To get NuGet working I copied the MonoDevelop.PackageManagement directory from Xamarin Studio 5.9 into Unity's MonoDevelop Addins directory.

Getting the NuGet extensions to work may be problematic since you have to make sure the version of NuGet.Core is the same used by the main NuGet addin and the extensions addin, at least on the Mac, otherwise you will get the error reported in this bug report.

Also for some reason Unity's version of MonoDevelop does not set the correct MonoDevelop version. It is set to 5.9 but it should be set to 5.9.6. Unfortunately that means the only version of the NuGet extensions addin that you can install without any error is version 0.7. So the correct version of the NuGet addin needs to be used so they are compatible. I have uploaded a .zip containing the binaries for the NuGet addin that should be compatible with NuGet extensions 0.7. This works on Windows with Unity's MonoDevelop 5.9.6.

My test steps were:

  1. MonoDevelop not running.
  2. Unzip the NuGet addin binaries into the Addins directory.
  3. Run MonoDevelop and check that the NuGet dialog can be opened.
  4. Install NuGet extensions 0.7 .mpack using the Add-in Manager.
  5. Restart MonoDevelop - otherwise the PowerShell console is not available from the View menu.
  6. Check that Manage Packages dialog can be opened and the PowerShell console can be opened.

It is most likely possible to get the latest version of the NuGet addin and the NuGet extensions to work but it would involve recompiling the NuGet extensions addin from source so Unity's MonoDevelop allows it to install or loaded.

mrward avatar Jan 09 '16 10:01 mrward

Great!! Now Manage Packages are working just fine!! Thanks a million! ~~About PowerShell I can't find it, where it is supposed to be?~~ Never mind! Maybe i am becoming blind! View>> Pads >> Package Console Extension!! Everything working like a charm! Thanks again!

Sposito avatar Jan 09 '16 13:01 Sposito

Im getting this with Xamarin Studio 5.10.1 screen shot 2016-01-13 at 12 04 27 pm

EDIT: SOLVED: after clean/delete "addin-db-002" folder inside ~/Library/Caches/XamarinStudio-5.0

AlejandroRuiz avatar Jan 13 '16 18:01 AlejandroRuiz

@mrward thanks!

muer2000 avatar Aug 12 '16 02:08 muer2000

@mrward I've got problems with latest Unity 2017.1.1f version, following the steps described in issuecomment-170224450. To solve this, I did the steps below:

  1. Extract NuGet-Unity596 content to Monodevelop Unity AddIns folder.
  2. Download MonoDevelop.PackageManagement.dll and NuGet.Core.dll from https://github.com/mrward/temp-addin-upload/tree/master/MonoDevelop.PackageManagement/2.8.7 and replace into: [Monodevelop folder]/AddIns/MonoDevelop.PackageManagement folder.
  3. Download the file MonoDevelop.PackageManagement.Extensions_0.10.1.mpack.
  4. Open monodevelop, click on Tools => Add-in Manager and click on button Install from file. Select the downloaded file above and install.
  5. Click with right button on solution (or click on menu Project), and click on submenu Manage Packages.
  6. Enjoy it! Search by nuget packages and install :)

You will see a screen like this:

nuget monodevelop

mfdeveloper avatar Sep 18 '17 15:09 mfdeveloper