This project is read-only.

BlogEngine.Core.Packaging.Installer compile errors

Topics: Business Logic Layer
Jun 4, 2012 at 3:15 AM

Hello All --

I'm receiving a compile error (actually 3, all related) when trying to compile the 2.6 source. I'm using the source, as I want to make some modifications, but I haven't made any yet, so this is a clean set of code.

The error I'm receiving is in the BlogEngine.Core project, under Packaging, in the Installer.cs file. It's occuring in the InstallPackage method, line 45:

packageManager.InstallPackage(package, false, true);

The errors are:

Error 96 The best overloaded method match for 'NuGet.PackageManager.InstallPackage(string, System.Version, bool)' has some invalid arguments Z:\Sandbox\BlogEngine.Core\Packaging\Installer.cs 45 17 BlogEngine.Core

Error 97 Argument 1: cannot convert from 'NuGet.IPackage' to 'string' Z:\Sandbox\BlogEngine.Core\Packaging\Installer.cs 45 47 BlogEngine.Core

Error 98 Argument 2: cannot convert from 'bool' to 'System.Version' Z:\Sandbox\BlogEngine.Core\Packaging\Installer.cs 45 56 BlogEngine.Core

If I right-click the code, and "Go to Definition", it displays 4 signatures:

InstallPackage(global::NuGet.IPackage, bool)
InstallPackage(string, global::System.Version)
InstallPackage(string, global::System.Version, bool)

I'm not sure where to go from here, I'm hoping someone has ran across this before, or knows the issue and how to fix it. Any help would be much appreciated.


Jun 4, 2012 at 3:07 PM

You should have NuGet.Core.dll in the /bin folder, it is version - this is what BlogEngine uses. You probably have different version of NuGet installed in your system GAC that overrides one in the /bin folder, and that version has different method signatures and not compatible. If it is older, you need to upgrade. If newer, we might need to upgrade BE to keep up with NuGet.

Jun 8, 2012 at 4:53 AM

You were correct, it was an old version that was installed. It was from an application I had installed via the Extensions Manager that was using version 1.0.1... of NuGet. It was installed in the GAC_MSIL folder. Removed the app and it worked fine. Thanks for the help rtur!