Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webmatrix 3.0 nuGet complaint about Net.Http

I just installed WebMatrix 3.0. When I clicked on the NuGet Extension on the ribbon to load some extensions, I get an error message that says the version of NuGret installed (2.2 apparently) is not compatible with the version of the .Net.Http dll. I've tried upgrading NuGet through the extension manager, but there doesn't seem to be a way to do that - there is only a disable and an uninstall option. Any thoughts on what's going on here? Why is an incompatible, back version of NuGet installed with WebMatrix 3.0?

Error message with stack trace follows:

An error occurred.

The schema version of 'Microsoft.Net.Http' is incompatible with version 2.2.31210.9045   of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.

System.InvalidOperationException: The schema version of 'Microsoft.Net.Http' is incompatible with version 2.2.31210.9045 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
   at NuGet.Manifest.CheckSchemaVersion(XDocument document)
   at NuGet.Manifest.ValidateManifestSchema(XDocument document, String schemaNamespace)
   at NuGet.Manifest.ReadFrom(Stream stream, IPropertyProvider propertyProvider)
   at NuGet.LocalPackage.ReadManifest(Stream manifestStream)
   at NuGet.ZipPackage.EnsureManifest()
   at NuGet.ZipPackage..ctor(Func`1 streamFactory, Boolean enableCaching)
   at NuGet.PackageDownloader.DownloadPackage(IHttpClient downloadClient, IPackageMetadata package)
   at NuGet.PackageDownloader.DownloadPackage(Uri uri, IPackageMetadata package)
   at NuGet.DataServicePackage.EnsurePackage(IPackageRepository cacheRepository)
   at NuGet.DataServicePackage.GetSupportedFrameworks()
   at NuGet.PackageRepositoryExtensions.<>c__DisplayClass2e.<SupportsTargetFrameworks>b__2d(FrameworkName t)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at NuGet.PackageRepositoryExtensions.SupportsTargetFrameworks(IEnumerable`1 targetFramework, IPackage package)
   at NuGet.PackageRepositoryExtensions.<>c__DisplayClass2b.<GetUpdatesCore>b__26(<>f__AnonymousType19`2 <>h__TransparentIdentifier22)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.GroupedEnumerable`3.GetEnumerator()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Microsoft.WebMatrix.NuGet.FilterManager.AddPackagesToFilter(ListViewFilter filter, IEnumerable`1 packages, PackageViewModelAction packageAction)
   at Microsoft.WebMatrix.NuGet.FilterManager.<>c__DisplayClass7.<UpdateFilterWithResult>b__6(Task`1 task)
   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
like image 378
T Driver Avatar asked Oct 01 '22 23:10

T Driver


1 Answers

I just encountered this same error message. The solution was to clear the NuGet package cache and try again.

More information on how to clear the NuGet package cache here.

like image 60
Oran Dennison Avatar answered Oct 05 '22 10:10

Oran Dennison