NuGet add reference error while installing package - windows-phone-8

I am not able to install any package by Nuget.
Install-Package MyToolkit.Extended
Attempting to resolve dependency 'MyToolkit (≥ 2.2.3.0)'.
Attempting to resolve dependency 'Microsoft.Bcl.Async (≥ 1.0.166)'.
Install-Package : The 'Microsoft.Bcl.Async 1.0.168' package requires NuGet clint version '2.8.1' or above, but the current NuGet
version is '2.7.40911.287'.
At line:1 char:1
+ Install-Package MyToolkit.Extended
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], NuGetVersionNotSatisfiedException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

I just ran into this problem. Even if the system Nuget is updated, the NuGet.exe in the .nuget directory could be older. Adding/removing the extension and playing around inside VS does not seem to update the NuGet.exe inside the solution. Even when you explicitly update Nuget inside VS, the solution's copy stays old.
Go into the .nuget folder and do "NuGet update -self".

According to the error message you got, I'd suggest to check and update your NuGet Visual Studio Extension (Tools > Extenstions and Update) before installing the library package.
Note: Restart visual studio after updating Nuget VS extension and before downloading your library package.

from Tools>Extnensions And Updates> uninstall NuGet and install in again, hope it will solve your problem

Related

Cant Insatll MySQL.Data from Nuget Manager

I am trying to install MySQL.Web in my Project but it throw me error
Error:
'MySql.Data' already has a dependency defined for 'Google.Protobuf'.
I try both way to install it.
By rigth click on project -> Manage NuGet Packages
by writing Install-Package MySql.Data in Package Manager Control.
But it throw me same error at both time.
I am using Visual Studio 2012
Thanks in Advance.
Check for the Framework you are using and the Dependency list.
I tried to install it Console Application in target Framework 4.5.2 and it worked.
If you want to run in framework 4.5 then try installing package with version 6.9.12 Because the newest packages have dependencies and also they don't work in framework 4.5.2
You can check the dependencies from MySql.Data

How to update MvvmCross?

I am using Visual Studio for Mac. I have MvvmCross v5.1.1 installed in my project. I want to update it (and all its dependencies and plugins) to v.5.3.1. But I get this error message in the output when I try to update my packages:
Unable to resolve dependencies. 'MvvmCross.Binding 5.3.1' is not
compatible with 'MvvmCross.Droid.Shared 5.1.1 constraint:
MvvmCross.Binding (= 5.1.1)'.
With MvvmCross version 5.2+ MvvmCross.Droid.Shared has been removed.
From MvvmCross blog release notes
As the nuget package MvvmCross.Droid.Shared no longer exists,
please force remove it first, and then update the rest of the
packages.
Visual Studio
You can run the following command in your Package Manager Console to remove it (Make sure that the default project dropdown is set to your Android project)
PM> Uninstall-Package MvvmCross.Droid.Shared -Force
Visual Studio for Mac
You can install NuGet Package Management Extensions addin (You can get the latest version of the addin from Github). Then execute the following command from the PowerShell Console Window (Make sure you have closed and re-opened IDE after the addin has been installed before trying to open the PowerShell Console)
PM> Uninstall-Package MvvmCross.Droid.Shared -Force

can't install html-agility-pack when install Newtonsoft.Json

I want to know why i can't install your pakage with Newtonsoft.Json and get this error :
Severity Code Description Project File Line Suppression State
Error An error occurred while retrieving package metadata for 'Newtonsoft.Json.10.0.3' from source 'C:\Users\......\packages'. 0
I try to use from both of them in .net 4
And i try to install them from nuget package
anyway for install i can use from ignore dependence option in package manager > install and update option > dependence behavior but sometimes when app is running and i got error...
any solution ?
Delete Newtonsoft.Json.10.0.3 folder from c:\....\packages and remove it's line from packages.config then delete from project reference again install lower version.

VS 2015 + universal app + mvvmcross 3.5.0 + sqlite

I started a new universal app using vs 2015 ctp 5, mvvmcross 3.5.0 + sqllite plugin 3.5.0.
I am using the famous N=.... serie of vídeos, especificaly n=12 Collect A Bull as a reference.
I created a new pcl Project as a core and a universal app Project(3 projects), added nuget packages to core , wp8.1 and to w8.1, everything good so far.
Then i copied the service folder from N=12 sample, added related nuget packages.
My trouble is: at this line _connection = factory.Create("collect.sql"); on repository i've got a exception :
A first chance exception of type 'System.DllNotFoundException' occurred in Cirrious.MvvmCross.Plugins.Sqlite.WindowsCommon.DLL
Additional information: Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
The message is pretty clear cannot found sqlite3.dll i've seen some articles to add file and reference manually, but i did not see nothing on the vídeo, and the N-12 sample runs ok?
How the sample can access the mentioned sqlite dll, it could be related to universal app?
By comparison i found a missing reference in wp project: Community.CsharpSqlite.WP7 i added manually but does not solve.
Any suggestions?
So, to solve this i just have to download from http://www.sqlite.org/download.html and add reference manually
Thanks to mohibsheth on jabbr room
Try adding
Install-Package MvvmCross.HotTuna.Plugin.Sqlite -Version 3.2.1
from package manager console. It worked for me.
If directly it didn't worked, then remove all the packages and add all packages of version 3.2.2 like :
Install-Package MvvmCross -Version 3.2.2
Install-Package MvvmCross.HotTuna.Plugin.FieldBinding -Version 3.2.2
Install-Package MvvmCross.HotTuna.Plugin.Messenger -Version 3.2.2
Still having problem with the packages?Uncheck Silverlight from Core project properties.
Version 3.5.0 raising problems for me too.
Hope this helps.
I would check out the SQLite.Net-PCL project. I've heard of some success in people using that although I have not personally used it yet.
I just submitted a pull request to the MvvmCross Community SQLite project to update it to MvvmCross 3.5 and unified iOS API - so you could give that a try as well. There is no new NuGet for that yet however. You'll need to clone the project and compile it yourself.

Ormlite for MySql looking for wrong version

We've got a project using Ormlite.MySql built for .NET 4.0.
Ormlite and its dependencies are loaded via NuGet (it's ServiceStack.Ormlite.MySql 3.9.54), including MySql.Data 6.6.5.
When we try to run the code, however, we get a dependency error:
Could not load file or assembly 'MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
The ServiceStack.OrmLite.MySql package in NuGet lists MySql.Data as a dependency, but doesn't list any specific version. In reflector, I can see that ServiceStack.OrmLite.MySql.dll is, in fact, referencing 6.6.4.0 of MySql.Data.dll.
Has anyone encountered this issue? I hate to hack the config file to redirect assmbly binding in general (always feels like a kludge).
I've just encountered the same problem. I solved it by downloading the Mysql.data.dll version 6.6.4.0 from servicestack on github: https://github.com/ServiceStack/ServiceStack.OrmLite/blob/master/lib/MySql.Data.dll
I had the same error. Just install with nuget : Mysql.data (it work for me)
nuget install the right version : "6.6.4"
(you could verify the version number in the nuget description)