VS2015(pro + upd 3):“应用程序无法启动” ObtainOptinStatus()中的例外情况 [英] VS2015 (pro + upd 3): "The application cannot start" Exception in ObtainOptinStatus()

查看:66
本文介绍了VS2015(pro + upd 3):“应用程序无法启动” ObtainOptinStatus()中的例外情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用Update 3(来自DVD ISO)的VS2015专业版的新安装中,无法启动IDE,报告"应用程序无法启动"。  由于这在第一次(以及所有后续)运行期间发生,因此无法设置产品密钥。

On a new installation of VS2015 professional with Update 3 (from the DVD ISO), the IDE cannot be started, reporting "The application cannot start." .  As this happens during first (and all subsequent) runs, the product key cannot be set.

此可用搜索结果大部分已过时(专注于VS2010)和更老的,特定于那些不再那样的东西的建议等。)。

Available search results for this are mostly outdated (focus on VS2010 and older, suggestions specific to things that are not like that any more etc.).

但是我能够通过运行devenv.exe / Log C来生成日志:\ SomeDir \\ \\ _Somefile.xml,重要条目似乎是:

However I was able to generate a log by running devenv.exe /Log C:\SomeDir\Somefile.xml, and the important entries appear to be:

<?xml version="1.0" encoding="utf-16"?>
<?xml-stylesheet type="text/xsl" href="ActivityLog.xsl"?>
<activity>
  <entry>
    <record>1</record>
    <time>2017/08/29 07:32:26.174</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Microsoft Visual Studio 2015 version: 14.0.25420.1</description>
  </entry>
  <entry>
    <record>98</record>
    <time>2017/08/29 07:32:27.414</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>End package load [Visual Studio Help Package]</description>
    <guid>{4A791146-19E4-11D3-B86B-00C04F79F802}</guid>
  </entry>
  <entry>
    <record>99</record>
    <time>2017/08/29 07:32:27.630</time>
    <type>Error</type>
    <source>Window Configurations</source>
    <description>Failed to load window configuration. Exception details: System.AggregateException: One or more errors occurred. ---&gt; System.InvalidCastException: Specified cast is not valid.&#x000D;&#x000A;
   at Microsoft.VisualStudio.Utilities.Internal.RegistryTools.GetRegistryIntValueFromLocalMachineRoot(String regKeyPath, String regKeyName, Nullable`1 defaultOnError)&#x000D;&#x000A;
   at Microsoft.VisualStudio.Telemetry.TelemetryOptinManager.ObtainOptinStatus()&#x000D;&#x000A;
   at System.Lazy`1.CreateValue()&#x000D;&#x000A;
   at System.Lazy`1.LazyInitValue()&#x000D;&#x000A;
   at System.Lazy`1.get_Value()&#x000D;&#x000A;
   at Microsoft.VisualStudio.Telemetry.TelemetryOptinManager.get_IsUserOptedIn()&#x000D;&#x000A;
   at Microsoft.VisualStudio.Telemetry.VSTelemetryService.CreateDefaultSession()&#x000D;&#x000A;
   at System.Lazy`1.CreateValue()&#x000D;&#x000A;
--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;
   at System.Lazy`1.get_Value()&#x000D;&#x000A;
   at Microsoft.VisualStudio.Telemetry.VSTelemetryService.GetDefaultSession()&#x000D;&#x000A;
   --- End of inner exception stack trace ---&#x000D;&#x000A;
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)&#x000D;&#x000A;
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)&#x000D;&#x000A;
   at System.Threading.Tasks.Task`1.get_Result()&#x000D;&#x000A;
   at Microsoft.Internal.VisualStudio.Shell.TelemetryHelper.GetLazyValue[T](AsyncLazy`1 lazy)&#x000D;&#x000A;
   at Microsoft.Internal.VisualStudio.Shell.TelemetryActivity.Dispose()&#x000D;&#x000A;
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowProfileCache.LoadProfileFromLocalStorage(String profileName, Boolean fromBackup)&#x000D;&#x000A;
---&gt; (Inner Exception #0) System.InvalidCastException: Specified cast is not valid.&#x000D;&#x000A;
   at Microsoft.VisualStudio.Utilities.Internal.RegistryTools.GetRegistryIntValueFromLocalMachineRoot(String regKeyPath, String regKeyName, Nullable`1 defaultOnError)&#x000D;&#x000A;
   at Microsoft.VisualStudio.Telemetry.TelemetryOptinManager.ObtainOptinStatus()&#x000D;&#x000A;
   at System.Lazy`1.CreateValue()&#x000D;&#x000A;
   at System.Lazy`1.LazyInitValue()&#x000D;&#x000A;
   at System.Lazy`1.get_Value()&#x000D;&#x000A;
   at Microsoft.VisualStudio.Telemetry.TelemetryOptinManager.get_IsUserOptedIn()&#x000D;&#x000A;
   at Microsoft.VisualStudio.Telemetry.VSTelemetryService.CreateDefaultSession()&#x000D;&#x000A;
   at System.Lazy`1.CreateValue()&#x000D;&#x000A;
--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;
   at System.Lazy`1.get_Value()&#x000D;&#x000A;
   at Microsoft.VisualStudio.Telemetry.VSTelemetryService.GetDefaultSession()&lt;---&#x000D;&#x000A;
    </description>
  </entry>
</activity>

机器正在运行经过合理更新的Windows 8.1 Pro(64位)。 由于用于C :( Windows)驱动器的小型SSD没有剩余空间,因此VS2015安装在D:驱动器上。 许多其他组件(SQL,IIS,SDK等)也已将
移动到D:使用目录符号链接(mklink / D命令)。

The machine is running a reasonably updated Windows 8.1 Pro (64 bit).  VS2015 is installed on the D: drive due to no space left on the small SSD used for the C: (Windows) drive.  A number of additional components (SQL, IIS, SDKs etc.) have also been moved to D: using directory symlinks (mklink /D command).

我试过看了在启动时使用Microsoft procmon并创建丢失的遥测选择退出日志中找到的注册表值([HKEY_CURRENT_USER \Software \ Microsoft &\\VisualStudio \Telemetry]  TurnOffSwitch = dword:0和[HKEY_CURRENT_USER \Software \ Microsoft \.NETFramework \XMLHKEY_CURRENT_USER \ Software {\\ MicroStoswork \ .NETFramework\XML]),
但仍然是同样的错误。

I have tried looking at the startup using Microsoft procmon and created the missing telemetry opt out registry values found in the logs ([HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\Telemetry] TurnOffSwitch=dword:0 and [HKEY_CURRENT_USER\Software\Microsoft\.NETFramework\XMLHKEY_CURRENT_USER\Software\Microsoft\.NETFramework\XML]), but still the same error.

删除并重新安装VS2015需要很长一段时间(每次尝试的小时数),接下来要检查的是什么?

Removing and reinstalling VS2015 takes a long time (hours per attempt), so what is the next thing to check?

推荐答案

您好74JBIw,

Hi 74JBIw,

感谢您在MSDN论坛上发帖。

Thank you for posting in MSDN forum.

>> 许多其他组件(SQL,IIS,SDK等)也已移至D:

这是根本原因,你不应该吨移动这些SDK或VS相关的组件来非系统驱动器。

This is the root cause, you shouldn't move those SDKs or VS related components to non-system drive.

共享的运行时间等.NET框架(和Visual Studio包括几个靶向包,该框架所以基本上单独的版本)。还有几个在Visual Studio,SQL Server,Office,IIS和Windows
SDK之间共享的包。那些在预定位置进入系统驱动器。批量可能是安装到特定包文件夹的Windows安装程序和包缓存。

Shared runtimes like the .NET Framework (and Visual Studio includes several targeting packs, so essentially separate versions of the framework). There are also several packages that are shared between Visual Studio,SQL Server, Office, IIS, and the Windows SDK. Those go on the System Drive in a predetermined location. The bulk is probably the windows Installer and package caches, which are installed to a specific package folder.

要解决此问题,请再次运行VS安装程序,将位置定位到您的计算机系统驱动器。然后重新启动计算机以重新启动VS以检查它是否可以正常运行。

To solve this issue, please run the VS setup installer again, target the location to your machine system drive. Then reboot your machine to re-launch VS to check if it can run properly.

最好的问候,


这篇关于VS2015(pro + upd 3):“应用程序无法启动” ObtainOptinStatus()中的例外情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆