Json.net not compatible for windows phone 8.1 - json.net

Trying to add NewtonSofts json.net library via nuget. Getting a "not compatible" dialog when clicking install.
1...Create new "Blank App" for Windows Phone 8.1 project in Visual Studio 2013 update 2
2...Click Manage NuGet packages
3...Find json.net version 6.0.3
4...Error dialog saying not compatible
Dialog also lists compatible versions, which includes wp7, wp80 and something called wpa81.
The error i get is as follows:
Installing 'Newtonsoft.Json 6.0.3'.
Successfully installed 'Newtonsoft.Json 6.0.3'.
Adding 'Newtonsoft.Json 6.0.3' to App1.
Uninstalling 'Newtonsoft.Json 6.0.3'.
Successfully uninstalled 'Newtonsoft.Json 6.0.3'.
Install failed. Rolling back...
Could not install package 'Newtonsoft.Json 6.0.3'. You are trying to install this package into a project that targets 'WindowsPhoneApp,Version=v8.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

I had this problem today as well. To fix it, here's a silly one, I unchecked WP8.1 on my project, installed JSON.NET, then went in and passive aggressively rechecked it, but it worked! On two separate projects, I might add. I built, deployed, tested, and all that good stuff without issue after that. I have no idea why, but I'm pretty sure as experienced developers we've all learned never to question things that work.

Related

nuget package manager console not working, package source dropwdown is disabled and empty

I'm new to asp.net, and I'm trying to run migrations, but I can't make the nuget console manager to work. I've installed everything:
the .NET core
Nuget package management extension
but I still can't work it out.
(the nuget.org source package is already installed and checked)

Xamarin.Firebase.Messaging 42.1021.1 failing to install for android

Hi I've trying to install Xamarin.Firebase.Messaging for notifications and I have been pulling my hair out for the past 3 days and I keep getting this error:
This collection is read-only
among many other from the different approaches I've tried like
Uninstalling Xamarin.GooglePlayServices packages and installing
Xamarin.Firebase.Messaging without any of the other
Xamarin.GooglePlayServices packages installed.
Changing The Xamarin.Firebase.Messaging To a different package version
Updating my AppCompat package(and even this fails to install)
As well as some other approaches that I can't re-call or clearly state right now. Luckily I've been using a Dummy project because had I not been doing so my project would have been broken or corrupt by now. Here's the nuget package installation log. Please assist I would highly appreciate any assistance.

Proget server feed does not include Nuget packages even though package has been pushed to the Proget server successfully

We are using Proget 4.4.2.5. We can successfully push the Nuget package to the Proget server but am not seeing the package in the feed.
The "nuget install" command fails when we omit the version (i.e. we want to fetch only the latest). It works for other Nuget packages that appear in the feed when version is omitted. The nuget install command only works on this package when the version is specified.
I have tried restarting the Proget Service but that does not appear to resolve the issue.
Thanks in advance for any assistance. This is an ugent / blocking issues for us.
Figured out that my specific package is a pre-release and thus required the prerelease option to be set on the nuget install command.

Unable to install packages for .NETFramework versions that should work

I'm running into an issue where I cannot install NuGet packages, or update packages, even though I have been able to install those packages in the past.
With a clean solution, I can create an ASP.NET MVC project using .NETFramework 4.5.2 (I've also tried with 4.6.1).
Since I take the default authentication options (Individual User Accounts), the Microsoft Owin packages are all scaffolded in, including the core Owin package (which is a dependency of the Microsoft Owin packages).
If I add another project (I started with a basic Class Library, but for testing purposes also tried a MVC project without authentication), I cannot add any Owin-related packages, as the Owin 1.0.0 package fails:
PM> Install-Package Owin
Attempting to gather dependencies information for package 'Owin.1.0.0' with respect to project 'Core', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'Owin.1.0.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Owin.1.0.0'
Resolved actions to install package 'Owin.1.0.0'
Install failed. Rolling back...
Package 'Owin.1.0.0 : ' does not exist in project 'Core'
Install-Package : Could not install package 'Owin 1.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', but the package does not contain any assembly referen ces or content files that are compatible with that framework. For more information, contact the package author.
At line:1 char:16
+ Install-Package <<<< Owin
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand PM>
The scaffolded project is using .NetFramework 4.5.2, and already has Owin version 1.0.0 working without a problem.
Similarly, Respond is included by default. The default version is 1.2.0.
I can use NuGet Package Manager to upgrade to version 1.4.1 without a problem. But if I try to upgrade to the latest stable, 1.4.2., I get the exact same errors as I do for the Owin install.
A coworker has a copy of the same project via source control, and he is also running VS2015. He can update to Respond 1.4.2. without a problem.
Another coworker duplicated every test I tried without running into any issues.
Even odder, I was able to add Owin and its dependencies to a .NET Class Library project this morning (but I couldn't upgrade to the newest Respond release). But after deleting the solution, and starting a new one, I started encountering my problems with a variety of packages.
I believe I found the solution.
I tried flushing my user cache and even uninstalling and reinstalling Visual Studio (deleting any AppData files that seemed related), but the problem persisted.
However, clearing the data in C:\Users\<<UserName>>\.nuget\packages has resolved the issue.

issues for NuGet after migrating a c# project

i'm trying to migrate a project into my visual studio 2012.
On the Manage NuGet Packages, I have this issue:
"Some NuGet Packages are missing from this solution. Click to restore from your online package sources"... but when i click on the restore button, it appears this issue:
"an error occurred while trying to restore packages: Unable to find version '4.1.0-alpha-121112' of package 'Microsoft.AspNet.WebApi'. "
i'm using .NET Framework 4
How can i solve?
Thanks in advance....
The problem is that version '4.1.0-alpha-121112' of package Microsoft.AspNet.WebApi does not exist on NuGet.org. It is not available on MyGet from the ASP.NET Web Stack Nightly package source either. So NuGet cannot restore it since it is no longer available.
Looking at Symbol Source it looks like this NuGet package was at one point available from the ASP.NET Web Stack Nightly package source on MyGet but it no longer seems to be available. I suspect they have deleted the old packages from that MyGet package source.
Unless you can find the original NuGet package, you will either have to manually remove the NuGet package reference, by editing the project file and packages.config file, and reinstall a version that exists.
1) Make sure you upgrade to the latest NuGet.
2) Make sure you're doing package restore "The Right Way" http://blog.davidebbo.com/2014/01/the-right-way-to-restore-nuget-packages.html
That should resolve the issue.
if still this ain't solve you can see this Rightway to migrate

Resources