我正在尝试使用Nuget将ServiceStack(https://servicestack.net/)安装到Visual Studio 2015 C#Umbraco UCommerce Web解决方案中,我收到以下错误消息。任何帮助理解或解决这个问题都将非常感谢
由于
特里克兰西
ClanceZ
Attempting to gather dependencies information for package 'ServiceStack.4.0.46' with respect to project 'TeraTastic03', targeting '.NETFramework,Version=v4.6'
Attempting to resolve dependencies for package 'ServiceStack.4.0.46' with DependencyBehavior 'Lowest'
Resolving actions to install package 'ServiceStack.4.0.46'
Resolved actions to install package 'ServiceStack.4.0.46'
Adding package 'ServiceStack.Interfaces.4.0.46' to folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Added package 'ServiceStack.Interfaces.4.0.46' to folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Added package 'ServiceStack.Interfaces.4.0.46' to 'packages.config'
Successfully installed 'ServiceStack.Interfaces 4.0.46' to TeraTastic03
Adding package 'ServiceStack.Text.4.0.46' to folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Added package 'ServiceStack.Text.4.0.46' to folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Added package 'ServiceStack.Text.4.0.46' to 'packages.config'
Successfully installed 'ServiceStack.Text 4.0.46' to TeraTastic03
Adding package 'ServiceStack.Client.4.0.46' to folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Added package 'ServiceStack.Client.4.0.46' to folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Added package 'ServiceStack.Client.4.0.46' to 'packages.config'
Successfully installed 'ServiceStack.Client 4.0.46' to TeraTastic03
Adding package 'ServiceStack.Common.4.0.46' to folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Added package 'ServiceStack.Common.4.0.46' to folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Added package 'ServiceStack.Common.4.0.46' to 'packages.config'
Successfully installed 'ServiceStack.Common 4.0.46' to TeraTastic03
Adding package 'ServiceStack.4.0.46' to folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Added package 'ServiceStack.4.0.46' to folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Added package 'ServiceStack.4.0.46' to 'packages.config'
Successfully installed 'ServiceStack 4.0.46' to TeraTastic03
Install failed. Rolling back...
Removed package 'ServiceStack 4.0.46' from 'packages.config'
Removed package 'ServiceStack.Common 4.0.46' from 'packages.config'
Removed package 'ServiceStack.Client 4.0.46' from 'packages.config'
Removed package 'ServiceStack.Text 4.0.46' from 'packages.config'
Removed package 'ServiceStack.Interfaces 4.0.46' from 'packages.config'
Removing package 'ServiceStack 4.0.46' from folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Removed package 'ServiceStack 4.0.46' from folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Removing package 'ServiceStack.Common 4.0.46' from folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Removed package 'ServiceStack.Common 4.0.46' from folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Removing package 'ServiceStack.Client 4.0.46' from folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Removed package 'ServiceStack.Client 4.0.46' from folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Removing package 'ServiceStack.Text 4.0.46' from folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Removed package 'ServiceStack.Text 4.0.46' from folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Removing package 'ServiceStack.Interfaces 4.0.46' from folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
Removed package 'ServiceStack.Interfaces 4.0.46' from folder 'C:\Clancy\A_TeraTastic\Dev\TeraTastic03\packages'
System.NullReferenceException: Object reference not set to an instance of an object.
at NuGet.PackageManagement.VisualStudio.AssemblyBinding.Parse(XContainer dependentAssembly)
at NuGet.PackageManagement.VisualStudio.BindingRedirectManager.<>c.<GetAssemblyBindings>b__18_0(XElement dependentAssemblyElement)
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 NuGet.PackageManagement.VisualStudio.BindingRedirectManager.GetAssemblyBindings(XDocument document)
at NuGet.PackageManagement.VisualStudio.BindingRedirectManager.AddBindingRedirects(IEnumerable`1 bindingRedirects)
at NuGet.PackageManagement.VisualStudio.RuntimeHelpers.<AddBindingRedirectsAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.VisualStudio.RuntimeHelpers.<AddBindingRedirectsAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.VisualStudio.RuntimeHelpers.<AddBindingRedirectsAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.VisualStudio.VSMSBuildNuGetProjectSystem.<<AddBindingRedirects>b__59_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
at NuGet.PackageManagement.VisualStudio.VSMSBuildNuGetProjectSystem.AddBindingRedirects()
at NuGet.ProjectManagement.MSBuildNuGetProject.PostProcessAsync(INuGetProjectContext nuGetProjectContext, CancellationToken token)
at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__42.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__42.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.UI.UIActionEngine.<ExecuteActionsAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.UI.UIActionEngine.<PerformActionAsync>d__3.MoveNext()
========== Finished ==========
答案 0 :(得分:0)
之前我没见过这个错误,但ServiceStack.Interfaces的不同之处在于它是签名的PCL .dll。
您可以尝试更新NuGet,或者只是尝试自行安装ServiceStack.Interfaces包:
PM> Install-Package ServiceStack.Interfaces