我的 VS Community 2015 许可证过期了。现在,任何尝试登录或更新许可证的操作都会导致错误消息“调用目标引发了异常”。我运行devenv /log
并追踪到问题出在“无法加载文件或程序集‘System.Net.Http.Primitives,Version=1.5.0.0...’”异常,该异常在 VS 尝试进行身份验证或类似操作时引发。
我尝试修复然后重新安装 VStudio,包括在 Github 中运行“scorch”卸载工具。我尝试运行sfc /scannow
,但没有发现完整性违规。我在网上找到的与此异常相关的所有内容都告诉我如何为在 VS 中运行的项目修复它,但没有告诉我如何在 VS 本身抛出它时修复它。我试过了devenv /resetuserdata
。/ResetSettings
什么都没用。
我觉得我需要从受信任的 DLL 手动更新我的 GAC,但我实在想不出如何做到这一点。
这是发生错误的完整 XML 日志条目元素devenv /log
:
<entry>
<record>368</record>
<time>2016/12/13 17:21:54.787</time>
<type>Error</type>
<source>UserConnection</source>
<description>User:IdeUser, Exception has been thrown by the target of an invocation.: TargetInvocationException [inner: Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.] during ExplicitSignIn
 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
 at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
 at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
 at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
 at System.Activator.CreateInstance(Type type, Object[] args)
 at Microsoft.VisualStudio.Services.Client.VssConnection.<GetClientInstanceAsync>d__15.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.Services.Client.VssConnection.<GetClientServiceImplAsync>d__13.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.Services.Client.VssConnection.<GetClientAsync>d__10`1.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.Services.Client.VssServerDataProvider.<ConnectAsync>d__39.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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
 at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.IdeConnector.<ConnectAsync>d__2.MoveNext() (ActivityId: 00000000-0000-0000-0000-000000000000)</description>
有任何想法吗?