Visual Studio 2015企业在启动,卸载和修复时崩溃

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Visual Studio 2015企业在启动,卸载和修复时崩溃相关的知识,希望对你有一定的参考价值。

如何修复Visual Studio 2015 Enterprise Edition以正确安装和运行?

在安装过程中,安装Java SE时出现问题。它是可选的,所以我没有想到它。我重新启动了电脑。现在,每当我尝试打开Visual Studio 2015,重新安装或卸载时,我会短暂地看到徽标,然后它就会消失。

我挖到事件查看器,从Windows错误报告中查找指向以下文件夹中的日志的消息。

C:用户 {我} 应用程序数据本地的 Temp dd_vs_enterprise_20150720190843

看起来好像创建视图有困难。我复制了以下日志的一部分。

[261C:12FC][2015-07-20T19:08:52]i000: MUX:  Detect Completed
[261C:12FC][2015-07-20T19:08:52]i000: MUX:  Wait for View to be loaded
[261C:1860][2015-07-20T19:08:52]i000: MUX:  Detect Completed, now create view
[261C:1860][2015-07-20T19:08:52]e000: MUX:  ERROR: The type initializer for 'System.Windows.Media.FontFamily' threw an exception.
[261C:1860][2015-07-20T19:08:52]e000: MUX:  Stack:    at System.Windows.Media.Typeface..ctor(FontFamily fontFamily, FontStyle style, FontWeight weight, FontStretch stretch)
   at MS.Internal.Text.DynamicPropertyReader.GetTypeface(DependencyObject element)
   at MS.Internal.Text.TextProperties.InitCommon(DependencyObject target)
   at MS.Internal.Text.TextProperties..ctor(FrameworkElement target, Boolean isTypographyDefaultValue)
   at System.Windows.Controls.TextBlock.GetLineProperties()
   at System.Windows.Controls.TextBlock.EnsureTextBlockCache()
   at System.Windows.Controls.TextBlock.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
   at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Window.MeasureOverrideHelper(Size constraint)
   at System.Windows.Window.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Interop.HwndSource.SetLayoutSize()
   at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   at System.Windows.Window.SetRootVisual()
   at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
   at System.Windows.Window.CreateSourceWindowImpl()
   at System.Windows.Window.SafeCreateWindow()
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.Show()
   at Microsoft.Devdiv.Bootstrapper.ManagedUx.RunUI(ViewModelCommonUi viewModel)
   at Microsoft.Devdiv.Bootstrapper.ManagedUx.InternalRun()
   at Microsoft.Devdiv.Bootstrapper.ManagedUx.Run()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
[261C:1860][2015-07-20T19:08:52]e000: MUX:  Exception: Info: InnerException: Info:
[261C:1860][2015-07-20T19:08:52]e000: MUX:  ERROR: The type initializer for 'MS.Internal.FontCache.Util' threw an exception.
[261C:1860][2015-07-20T19:08:52]e000: MUX:  Stack:    at System.Windows.Media.FontFamily.PreCreateDefaultFamilyCollection()
   at System.Windows.Media.FontFamily..cctor()
[261C:1860][2015-07-20T19:08:52]i000: MUX:  Metrics: ShouldSendData=True
[261C:1860][2015-07-20T19:08:52]i000: MUX:  Permission to upload: Yes
[261C:1860][2015-07-20T19:08:52]i000: MUX:  Preparing to serialize data.
[261C:1860][2015-07-20T19:08:52]i000: MUX:  Data serialized.
[261C:1860][2015-07-20T19:08:52]i000: MUX:  Number of SQM File queued: 1
[261C:1860][2015-07-20T19:09:14]i000: MUX:  SQM sent: True
[261C:1860][2015-07-20T19:09:14]i000: Setting string variable 'CEIPConsent' to value ''
[261C:1860][2015-07-20T19:09:14]i000: Setting string variable 'SqmOption' to value ''
[261C:1860][2015-07-20T19:09:14]i000: MUX:  Metrics: Configuration State
答案

我有类似的问题,并尝试其他解决方案无济于事。我甚至修复了安装但没有效果。我能够通过重置所有用户设置来解决它。

导航到devenv.exe文件;对我来说,这是在C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDE

然后在那里打开命令提示符并运行:

devenv.exe /ResetSettings

另一答案

经过相当多的研究,我发现了两个导致我的安装和修复问题的问题。

注册表中的字体奇怪

  1. Open the registry
  2. 转到注册表HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionFontCache中的字体位置
  3. 在我的案例中有一个特殊的字体,MT Extra(TTF),它有一个很长的路径,而不是像其他字体一样的文件名。
  4. 我将字体名称更改为文件名MTEXTRA.TFF
  5. 重新启动了我的电脑

Registry Screenshot

PATH超过2048个字符

  1. 我检查了路径,发现它超过了2048个字符
  2. 这是一个known issue(即使难以诊断)
  3. Removed certain entries将它降低到不到2048个字符
  4. 重新启动

完成这两个步骤后,我能够从控制面板中的Programs and Features进行修复并进行安装。

另一答案

我有同样的问题,这就是我所做的:

  1. 清除%temp%之外的所有东西,在我的机器上是“C: Users [用户名] AppData Local Temp”
  2. 重新启动我的机器。
  3. 重新启动后,将其余的锁定文件从%temp%中清除(这可能是重启后的一步,但这就是我进入的顺序)。
  4. 删除我的android SDK文件夹中所有已安装的最高版本的“Roboto”字体。对我来说,最高版本是android-17:C: Users [用户名] AppData Local Android android-sdk platforms android-17 data fonts

请注意,即使重新启动后,“Roboto-Bold.ttf”字体仍在使用,因此我没有将其删除。但问题随着所有其他人的删除而消失。

希望有帮助......

以上是关于Visual Studio 2015企业在启动,卸载和修复时崩溃的主要内容,如果未能解决你的问题,请参考以下文章

从 Visual Studio 2015 企业更新 1 面向 Windows XP

VS2015|Visual Studio Enterprise 2015简体中文版(企业版)

安装 Visual Studio 2015 企业版是不是足以使用 C++11/C++14?

Visual Studio 2015简体中文企业版/专业版下载+有效激活密钥

VS2015|Visual Studio Enterprise 2015简体中文版(企业版)

visual studio 2015专业版和企业版的区别