How to upgrade Nuget Package Manager on WebMatrix 2 - webmatrix-2

I was trying to install a package on WebMatrix but got an error that says I must upgrade my Nuget Package Manager, and the message gave me a link to visit. However the link does not work, and I failed after trying many times to upgrade the Nuget Package Manager. How do I simply upgrade Nuget Package Manager on WebMatrix 2?

Related

Unable to Install Microsoft.Toolkit.Uwp.UI.Controls 3.0.0

Using NuGet Package Manager, I get this error message:
Could not install package 'Microsoft.Toolkit.Uwp.UI.Controls 3.0.0'.
You are trying to install this package into a project that targets 'native,Version=v0.0',
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. 0
The app is a Blank App (C++/winRT). Visual Studio 15.8.0 Preview 4.0.(10.0.17134.0, 10.0.17704.0)
Despite it's name, the Windows Community Toolkit is only intended for C# developers.

NuGet Package Reference Versioning and VS Package Manager

I have been setting the package references in my .csproj files to accept any minor version of dependent NuGet packages (see NuGet Package Versioning reference examples). An example of this might be as per the below:
<!-- Accepts any 6.2.x version. -->
<PackageReference Include="ExamplePackage" Version="6.2.*" />
However, whilst this appears to work (i.e. the latest release version of 6.2.2 is restored), the NuGet package manager GUI built into Visual Studio appears to read the package reference as 6.2.0 and prompts me to upgrade to 6.2.2.
Performing a restore from the command line appears to download 6.2.2 but I cannot get the VS Package Manager to play ball.
Is there any way to get the VS Nuget Package Manager GUI to accept that 6.2.2 is what has actually been restored?
However, whilst this appears to work (i.e. the latest release version of 6.2.2 is restored), the NuGet package manager GUI built into Visual Studio appears to read the package reference as 6.2.0 and prompts me to upgrade to 6.2.2
This is a known issue about the PackageReference versioning with wildcard.
It seems use a wildcard * is the correct way for NuGet Restore to float to a higher version. However, the NuGet package manager GUI still takes the lowest version. The current workaround is update the nuget package to the latest version via NuGet package manager GUI, but this way will remove the wildcard *.
For tracking this NuGet issue, I recommend that you vote on and follow the earlier reported issue for updates and fix notifications:
https://github.com/NuGet/Home/issues/3788
Hope this helps.

Unable to update NuGet package

Working with VS2015 I recently updated an add-on I use, ActiveReports, to a new version. Previously I had my application set for netframework 4.0, the new update for ActiveReports required at least netframework 4.5 so I changed the project to use that version.
I am getting the following error now when I build the project:
"Some NuGet packages were installed using a target framework different from the current target framework and may need to be reinstalled. Visit http://docs.nuget.org/docs/workflows/reinstalling-packages for more information. Packages affected: Microsoft.Bcl, Microsoft.Net.Http"
I have been looking at the various options suggested to address this none have worked. The last one I tried from Tools> NuGet Package Manager > Package Manager Console resulted in the following message:
PM> Update-Package
Attempting to gather dependency information for multiple packages with respect to project 'My Project', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for multiple packages.
Resolving actions install multiple packages
Resolution was successful but resulted in no action
There are no new updates available.
No package updates are available from the current package source for project 'My Project'
I can reproduce this by:
creating a new project as .NET 3.5, installing NuGet package Newtonsoft.Json" (just for example).
Changing my project to .NET 4.5
Then I receive an error:
Severity Code Description Project File Line Suppression State
Error Some NuGet packages were installed using a target framework different from the current target framework and may need to be reinstalled. Visit http://docs.nuget.org/docs/workflows/reinstalling-packages for more information. Packages affected: Newtonsoft.Json ConsoleApp7 0
To resolve:
Uninstall the existing NuGet packages (for that project), and reinstall them:
How:
Right-click your Solution:
Choose "Manage NuGet Packages for Solution..."
Navigate to the "Project" you changed to .NET 4.5
Choose "Uninstall", then try to reinstall them, using the same steps.
After re-installation of the package is complete, the build error is gone.

Google plus api nuget package download

I want to include Plus.v1 namespace in my mvc application. I am unable to find any package on nuget to download the dll's.
www.nuget.org has been experiencing some problems, especially related to search. Please check back later and sorry for the inconveniences.
Run the following command in the Package Manager Console: Install-Package Google.Apis.Plus.v1
To access PMC (Package Manager Console) go to "Tools -> Nuget Package Manager -> Package Manager Console"

NuGet Issue installing SignalR and Raven

I am trying to use NuGet to add SignalR and Raven to a new ASP.Net MVC 4 project.
If I do SignalR first, then try to add Raven I get the following error:
Install failed. Rolling back... Install-Package : Already referencing
a newer version of 'Newtonsoft.Json'.
If I install Raven first, then SignalR I get:
Install failed. Rolling back... Install-Package : Updating
'Newtonsoft.Json 4.5.7' to 'Newtonsoft.Json 4.5.8' failed. Unable to
find a version of 'RavenDB.Client' that is compatible with
'Newtonsoft.Json 4.5.8'.
I thought NuGet was meant to handle this sort of thing?
How can I get them both added?
It appears that RavenDB.Client has an exact-version constraint on Newtonsoft.Json = 4.5.7, while SignalR has a more relaxed constraint of '4.5.4 or higher' (actually a constraint imposed by one of its own dependencies, SignalR.Server).
I managed to get your above scenario working with some manual tweaking:
Created new MVC4 project
Opened up packages.config and added an 'allowedVersions="[4.5.7]"' attribute to the Newtonsoft.Json package entry
Opened the package manager console (View... Other windows... Package Manager Console) and ran update-packages to pull in latest code for all default dependencies (takes a while)
Again in package manager console, ran install-package RavenDB.Client
Finally in package manager console, ran install-package SignalR
I tried a few combinations of ordering the above but it wasn't liking it - the thing that let it work seems to be the manual editing of packages.config to lock the version of Newtonsoft.Json to 4.5.7 so that subsequent installs don't trash the referenced version.
We ran into this exact issue, but ultimately pulled in the Raven assemblies manually (so we could target a specific version).
Something that we came across is that it is possible to force Nuget to install a package using the command line tools:
How to install an older version of package via NuGet?
I ran into the same issue, but instead decided to install an older version of SignalR. Version 4.0 (February 2012) has a dependency on NewtonSoft >= 4.0.7, and this installs correctly with RavenDB already installed:
Install-Package SignalR -Version 0.4.0
I got the same problem with Raven and the standard MVC template. I wanted the latest version of Newtonsoft.Json so I solved it differently.
I checked what dependencies RavenDB Client had and then installed the latest version of them first Newtonsoft.Json and NLog
I then installed the packet in the Packet manager Console with the -IgnoreDependencies flag.
Install-Package -Id RavenDB.Client -IgnoreDependencies
That worked fine. (I am taking a calculated risk that RavenDB is not compatible with the latest Newtonsoft.Json at the moment. But I am a Daredevil)