单击WebMatrix中的“NuGet”按钮时,出现此错误。我尝试重新安装WebMatrix,并从扩展库重新安装NuGet 扩展库也告诉我没有更新,所以我也无法更新它。
An error occurred.
The schema version of 'Microsoft.AspNet.WebPages' is incompatible with version 2.5.40416.9020 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
System.InvalidOperationException: The schema version of 'Microsoft.AspNet.WebPages' is incompatible with version 2.5.40416.9020 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
ved NuGet.Manifest.CheckSchemaVersion(XDocument document)
ved NuGet.Manifest.ReadFrom(Stream stream, IPropertyProvider propertyProvider, Boolean validateSchema)
ved NuGet.LocalPackage.ReadManifest(Stream manifestStream)
ved NuGet.OptimizedZipPackage.EnsureManifest()
ved NuGet.OptimizedZipPackage..ctor(IFileSystem fileSystem, String packagePath)
ved NuGet.LocalPackageRepository.OpenPackage(String path)
ved NuGet.LocalPackageRepository.GetPackage(Func`2 openPackage, String path)
ved NuGet.LocalPackageRepository.<>c__DisplayClass9.<FindPackage>b__5(String path)
ved System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
ved System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
ved System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
ved NuGet.LocalPackageRepository.FindPackage(Func`2 openPackage, String packageId, SemanticVersion version)
ved NuGet.LocalPackageRepository.FindPackage(String packageId, SemanticVersion version)
ved NuGet.PackageRepositoryExtensions.FindPackage(IPackageRepository repository, String packageId, SemanticVersion version, IPackageConstraintProvider constraintProvider, Boolean allowPrereleaseVersions, Boolean allowUnlisted)
ved NuGet.DataServicePackage.EnsurePackage(IPackageCacheRepository cacheRepository)
ved NuGet.DataServicePackage.GetSupportedFrameworks()
ved NuGet.PackageRepositoryExtensions.<>c__DisplayClass2a.<SupportsTargetFrameworks>b__29(FrameworkName t)
ved System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
ved NuGet.PackageRepositoryExtensions.SupportsTargetFrameworks(IEnumerable`1 targetFramework, IPackage package)
ved NuGet.PackageRepositoryExtensions.<>c__DisplayClass27.<GetUpdatesCore>b__23(IPackage candidate)
ved System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
ved System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
ved NuGet.PackageRepositoryExtensions.GetUpdatesCore(IPackageRepository repository, IEnumerable`1 packages, Boolean includePrerelease, Boolean includeAllVersions, IEnumerable`1 targetFramework, IEnumerable`1 versionConstraints)
ved NuGet.DataServicePackageRepository.GetUpdates(IEnumerable`1 packages, Boolean includePrerelease, Boolean includeAllVersions, IEnumerable`1 targetFrameworks, IEnumerable`1 versionConstraints)
ved NuGet.PackageRepositoryExtensions.GetUpdates(IPackageRepository repository, IEnumerable`1 packages, Boolean includePrerelease, Boolean includeAllVersions, IEnumerable`1 targetFrameworks, IEnumerable`1 versionConstraints)
ved NuGet.WebMatrix.WebProjectManager.GetPackagesWithUpdates(String searchTerms, Boolean filterPreferredPackages)
ved NuGet.WebMatrix.NuGetPackageManager.GetPackagesWithUpdates()
ved NuGet.WebMatrix.NuGetModel.GetPackagesWithUpdates()
ved NuGet.WebMatrix.FilterManager.GetUpdatePackages()
ved System.Threading.Tasks.Task`1.InnerInvoke()
ved System.Threading.Tasks.Task.Execute()
答案 0 :(得分:1)
在功能区中,单击“图库”按钮。当显示NuGet库时,只需将defalut包源类型(WebMatrix包源)更改为NuGet官方包源。