我正在开发一个使用 Umbraco 7.3.1、Ucommerce 6.8.3、NuGet 3.2.6 并在 Windows 10 pro (x64) 上运行 Visual Studio 2015 的项目
由于某种原因,我无法在项目中安装任何 Nuget 包。这个问题好像是我在项目中安装ucommerce后出现的。
这是我尝试安装 jQuery 的示例。请注意,此问题与 jQuery 无关,我在所有包中都收到此错误。
PM> Install-Package jQuery
Attempting to gather dependencies information for package 'jQuery.2.1.4' with respect to project '[Project-Name]', targeting '.NETFramework,Version=v4.6'
Attempting to resolve dependencies for package 'jQuery.2.1.4' with DependencyBehavior 'Lowest'
Resolving actions to install package 'jQuery.2.1.4'
Resolved actions to install package 'jQuery.2.1.4'
Adding package 'jQuery.2.1.4' to folder 'C:\Projects\uCommerce\[Project-Name]\packages'
Added package 'jQuery.2.1.4' to folder 'C:\Projects\uCommerce\[Project-Name]\packages'
Added package 'jQuery.2.1.4' to 'packages.config'
Executing script file 'C:\Projects\uCommerce\[Project-Name]\packages\jQuery.2.1.4\tools\install.ps1'
Successfully installed 'jQuery 2.1.4' to [Project-Name]
Install failed. Rolling back...
Removed package 'jQuery 2.1.4' from 'packages.config'
Executing script file 'C:\Projects\uCommerce\[Project-Name]\packages\jQuery.2.1.4\Tools\uninstall.ps1'
Removing package 'jQuery 2.1.4' from folder 'C:\Projects\uCommerce\[Project-Name]\packages'
Removed package 'jQuery 2.1.4' from folder 'C:\Projects\uCommerce\[Project-Name]\packages'
Install-Package : Object reference not set to an instance of an object.
At line:1 char:1
+ Install-Package jQuery
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
这里奇怪的是,如果首先 sais成功将 'jQuery 2.1.4' 安装到 [Project-Name],紧随其后的是安装失败。滚回来...
我似乎从来没有得到任何有用的堆栈跟踪。
我的一位最初建立这个项目的同事也有同样的问题。
我们已经尝试了很多东西,包括重新安装 Windows 以及使用新的解决方案文件和新数据库从头开始重新设置整个项目,但问题总是会再次出现。
编辑:这是所有当前安装的 NuGet 包的列表
Id 版本
-- --------
Antlr {3.4.1.9004}
AutoMapper {3.0.0}
ClientDependency {1.8.4}
ClientDependency-Mvc5 {1.8.0.0}
检查 {0.1.68.0}
HtmlAgilityPack {1.4.9}
idseefeld.de.UmbracoAzure {1.0.0.0}
ImageProcessor {2.3.0.0}
ImageProcessor.Web {4.4.0.0}
Lecoati.LeBlender {1.0.8.2}
Lucene.Net {2.9.4.1}
Microsoft.AspNet.Identity.Core {2.2. 1}
Microsoft.AspNet.Identity.Owin {2.2.1}
Microsoft.AspNet.Mvc {5.2.3}
Microsoft.AspNet.Razor {3.2.3}
Microsoft.AspNet.Web.Optimization {1.1.3}
Microsoft.AspNet.WebApi { 5.2.3}
Microsoft.AspNet.WebApi.Client {5.2.3}
Microsoft.AspNet.WebApi.Core {5.2.3}
Microsoft.AspNet.WebApi.WebHost {5.2.3}
Microsoft.AspNet.WebHelpers {3.2.3}
Microsoft.AspNet.WebPages {3.2.3}
Microsoft.AspNet.WebPages.Data {3.2.3}
Microsoft.AspNet.WebPages.WebData {3.2.3}
Microsoft.Bcl {1.1.10}
Microsoft.Bcl.Build {1.0. 14}
Microsoft.CodeDom.Providers.DotN ... {1.0.0}
Microsoft.Data.Edm {5.6.0}
Microsoft.Data.OData {5.6.0}
Microsoft.Data.Services.Client {5.6.0}
Microsoft.Net.Compilers {1.0.0}
Microsoft.Net.Http {2.2. 29}
Microsoft.Owin {3.0.1}
Microsoft.Owin.Host.SystemWeb {3.0.1}
Microsoft.Owin.Security {3.0.1}
Microsoft.Owin.Security.Cookies {3.0.1}
Microsoft.Owin.Security。 OAuth {3.0.1}
Microsoft.Web.Infrastructure {1.0.0.0}
Microsoft.WindowsAzure.Configura... {1.8.0.0}
MiniProfiler {2.1.0}
MySql.Data {6.9.8}
Newtonsoft.Json {6.0.8 }
Owin {1.0}
semver {1.1.2}
SharpZipLib {0.86.0}
System.Spatial {5.6.0}
UmbracoCms {7.3.1}
UmbracoCms.Core {7.3.1}
WebGrease {1.5.2}
WindowsAzure.Storage {3.2. 1}
xmlrpcnet {2.5.0}
编辑 2:我尝试将 NuGet 从 3.2.6 降级到 3.0.6,但没有任何改变。
编辑 3:安装了 VS2013,并尝试使用 NuGet 2.8,但我仍然遇到同样的问题
编辑 4:发生错误后,尝试在包管理器控制台中运行以下命令。这是 VS2013/NuGet 2.9 的结果
$error[0].Exception.StackTrace
at NuGet.PackageRepositoryHelper.ResolvePackage(IPackageRepository sourceRepository, IPackageRepository localRepository, IPackageConstraintProvider constraintProvider, String packageId, SemanticVersion version, Boolean allowPrereleaseVersions)
at NuGet.VisualStudio.VsPackageManager.InstallPackage(IProjectManager projectManager, String packageId, SemanticVersion version, Boolean ignoreDependencies, Boolean allowPrereleaseVersions, Boolean skipAssemblyReferences, ILogger logger)
at NuGet.VisualStudio.VsPackageManager.InstallPackage(IProjectManager projectManager, String packageId, SemanticVersion version, Boolean ignoreDependencies, Boolean allowPrereleaseVersions, ILogger logger)
at NuGet.PowerShell.Commands.InstallPackageCommand.InstallPackage(IVsPackageManager packageManager)
at NuGet.PowerShell.Commands.InstallPackageCommand.ProcessRecordCore()
at NuGet.PowerShell.Commands.NuGetBaseCommand.ProcessRecord()
从 VS2015/NuGet 3.2 开始,$error[0].Exception.StackTrace 没有结果