首页 文章

安装Visual Studio 2015 RTM后未加载包

提问于
浏览
92

问题

我安装了Visual Studio 2015 RC并在其上安装了Visual Studio 2015 RTM . 我在互联网上找不到任何说你不能这样做的东西 . 我不知道这是否与问题有关 .

不幸的是,当我在重新启动后第一次启动VS 2015 RTM时弹出消息框:

“'Microsoft.VisualStudio.Editor.Implementation.EditorPackage'包未正确加载”

也:

  • XamarinShellPackage

  • TestWindowPackage

  • NuGetPackage

  • ErrorListPackage

我该如何解决这个错误?

日志

据说要查看 ActivityLog.xml . 我找不到Microsoft.VisualStudio.Editor.Implementation.EditorPackage .

但对于 XamarinShellPackage 它说:

<entry>
    <record>339</record>
    <time>2015/07/21 13:01:54.011</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [XamarinShellPackage]</description>
    <guid>{2D510815-1C4E-4210-BD82-3D9D2C56C140}</guid>
    <hr>80070057 - E_INVALIDARG</hr>
    <errorinfo>'providers' cannot contain a null (Nothing in Visual Basic) element.
Parameter name: providers</errorinfo>
  </entry>
  <entry>
    <record>340</record>
    <time>2015/07/21 13:01:54.013</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [XamarinShellPackage]</description>
    <guid>{2D510815-1C4E-4210-BD82-3D9D2C56C140}</guid>
    <hr>80070057 - E_INVALIDARG</hr>
    <errorinfo>'providers' cannot contain a null (Nothing in Visual Basic) element.
Parameter name: providers</errorinfo>
  </entry>

对于 TestWindowPackage

<entry>
   <record>394</record>
   <time>2015/07/21 13:02:02.751</time>
   <type>Error</type>
   <source>TestWindowPackage</source>
   <description>TestWindowPackage.Initialize failed with exception:
&#x000D;&#x000A;&#x000D;&#x000A;System.NullReferenceException:
Object reference not set to an instance of an object.&#x000D;&#x000A;
at Microsoft.VisualStudio.TestWindow.VsHost.TestWindowPackage.Initialize()
&#x000D;&#x000A;&#x000D;&#x000A;PackageContainer loaded: False &#x000D;&#x000A;</description>
</entry>
<entry>
   <record>395</record>
   <time>2015/07/21 13:02:02.752</time>
   <type>Error</type>
   <source>VisualStudio</source>
   <description>SetSite failed for package [TestWindowPackage]</description>
   <guid>{BFC24BF4-B994-4757-BCDC-1D5D2768BF29}</guid>
   <hr>80004003 - E_POINTER</hr>
   <errorinfo>Object reference not set to an instance of an object.</errorinfo>
</entry>

对于 NuGetPackage

<entry>
    <record>405</record>
    <time>2015/07/21 13:02:04.096</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [NuGetPackage]</description>
    <guid>{5FCC8577-4FEB-4D04-AD72-D6C629B083CC}</guid>
    <hr>80004003 - E_POINTER</hr>
    <errorinfo>Object reference not set to an instance of an object.</errorinfo>
  </entry>
  <entry>
    <record>406</record>
    <time>2015/07/21 13:02:04.096</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [NuGetPackage]</description>
    <guid>{5FCC8577-4FEB-4D04-AD72-D6C629B083CC}</guid>
    <hr>80004003 - E_POINTER</hr>
    <errorinfo>Object reference not set to an instance of an object.</errorinfo>
  </entry>

对于 ErrorListPackage ,它说:

<entry>
    <record>409</record>
    <time>2015/07/21 13:02:04.624</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [ErrorListPackage]</description>
    <guid>{4A9B7E50-AA16-11D0-A8C5-00A0C921A4D2}</guid>
  </entry>
  <entry>
    <record>410</record>
    <time>2015/07/21 13:02:04.629</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [ErrorListPackage]</description>
    <guid>{4A9B7E50-AA16-11D0-A8C5-00A0C921A4D2}</guid>
    <hr>80004003 - E_POINTER</hr>
    <errorinfo>Object reference not set to an instance of an object.</errorinfo>
  </entry>

到目前为止我尝试了什么

那么......有什么建议吗?

问题的更新

首次更新

我只是试图加载一个项目......有些事情是非常错误的 . 它无法加载一堆包,如:“CSharpPackage,IntegrationPackage,MigrationPackage,FileIndicatorPackage等......”,解决方案资源管理器完全空白!到底是怎么回事?

第二次更新

这是我的程序和功能的样子:
Screenshot of Programs and Features

第三次更新

我已经卸载并删除了尽可能多的内容 .

  • 删除了AppData \ Roaming \ Microsoft \ VisualStudio \ 14.0中的所有内容

  • 删除了AppData \ Local \ VisualStudio \ 14.0中的所有内容

  • 通过程序和功能卸载Visual Studio 2015(屏幕截图)

  • 完全删除了Program Files文件夹中的Visual Studio Secondary Installer文件夹

  • 从Program Files中删除了与Visual Studio 14.0有关的所有内容

我不想搞砸我的Visual Studio 2013安装 . VS2015 still can't load the packages above! 因此,如果有人从上面的屏幕截图中获得了关于哪些程序可以完全卸载的更多信息,我将非常高兴 .

第四次更新

要采取的步骤(从更新3更新)

  • 删除了AppData \ Roaming \ Microsoft \ VisualStudio \ 14.0中的所有内容

  • 删除了AppData \ Local \ VisualStudio \ 14.0中的所有内容

  • Remove everything concerning Visual Studio 14.0 from ProgramData

  • 通过程序和功能卸载Visual Studio 2015(屏幕截图)

  • Did everything this article says: https://support.microsoft.com/nl-nl/kb/3016536

  • 完全删除了Program Files文件夹中的Visual Studio Secondary Installer文件夹

  • 基本上从Program Files中删除了与Visual Studio 14.0有关的任何内容 . 在程序和功能中卸载时遗留的任何内容 .

  • Uninstall Microsoft Visual C++ redistributable (x86) - 14.0.xxx also

  • Uninstalled my Xamarin stuff also

  • Hope I didn't forget anything, but bottomline is to totally get rid of anything visual studio 2015 related.

  • Reinstall visual studio 2015 RTM and it should work now. I have to install some 3rd party stuff again, but atleast it works!

11 回答

  • 189

    我在我的机器上安装了2012年,2013年和2015年的visual studio . 安装Visual Studio 2013 Update 5后,我开始在VS 2013中收到“包未正确加载”错误 .

    我所做的一切就是按照这一步:

    • 关闭Visual Studio的所有实例

    • 删除此文件夹中的所有内容 C:\Users\%username%\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache

    • 重新启动Visual Studio

    虽然我没有在2015年试过这个,但我相信这也应该解决这个问题 . 要为visual studio 2015执行此操作, 12.0 应更改为 14.0

    UPDATE

    而不是删除文件夹中的所有内容(如上面的 step 2 所示),重命名文件夹并允许Visual Studio创建一个新文件夹更安全 . 有时,您可能需要从旧文件夹中复制一些东西 .

    我希望这能进一步帮助大家 .

  • 2

    Visual Studio 2015 Update 1 的另一个解决方法

    • 打开 c:\Users\{User_Name}\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config

    • 更改 System.Collections.Immutable 的绑定重定向, newVersion 应为 1.1.37.0 (不是 1.1.36.0 ) .

    重定向应如下所示:

    <dependentAssembly>
            <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
            <bindingRedirect oldVersion="1.0.27.0-1.1.65535.65535" newVersion="1.1.37.0"/>
        </dependentAssembly>
    

    来自 ActivityLog.xml 的错误:

    包[CSharpPackage]的SetSite失败[无法加载文件或程序集'System.Collections.Immutable,Version = 1.1.36.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'或其依赖项之一 . 定位的程序集的清单定义与程序集引用不匹配 . (来自HRESULT的异常:0x80131040)]:{at Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService.AbstractPackage`2.Initialize()at Microsoft.VisualStudio.LanguageServices.CSharp.LanguageService.CSharpPackage.Initialize()at Microsoft.VisualStudio.Shell .Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)}

    您可以在我的博客文章How to restore Visual Studio 2015 after the Update 1中详细了解如何解决此类问题

  • 48

    我有与VS 2015社区RTC有同样的问题,并能够通过删除以下内容来修复此问题:

    • C:\Users\<your users name>\AppData\Local\Microsoft\VisualStudio\14.0

    • C:\Users\<your users name>\AppData\Roaming\Microsoft\VisualStudio\14.0

    所以我建议您尝试这样做,因为您可以避免卸载/重新安装VS.

  • 1

    由于VS2015中的扩展,我不得不重命名:C:\ Users \ AppData \ Local \ Microsoft \ VisualStudio \ 14.0

    重命名后,我打开VS2015并收到更多这些错误,但重新创建了14.0文件夹 .

    我关闭了VS2015并将文件夹Extensions和STemplate从原始/重命名文件夹复制到新文件夹 .

    重新打开VS2015,一切正常 .

    更新:2015年9月24日下午12:17:它再次停止工作 . 我在这篇文章中尝试了所有选项 . 我发现了另一篇文章,这似乎有效:

    运行:devenv / clearcache devenv / updateconfiguration

  • 1

    与@Tom Clelford的解决方案类似,但除了删除以下内容中的所有内容:

    C:\ Users \ AppData \ Local \ Microsoft \ VisualStudio \ 14.0

    我不得不删除所有内容

    C:\ Users \ AppData \ Local \ Microsoft \ VisualStudio \ vshub

    我没有在Roaming文件夹中触摸任何内容,但这可能因用户而异 .

  • 29

    我的问题发生在安装Visual Studio 2015 Update 1之后

    我没有运气就尝试了所有建议的解决方案,对我有用的解决方案是来自Eric Knox(Microsoft团队)的解决方案

    就是这个

    cd "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE"
    ren devenv.exe.config devenv.exe.config.backup
    copy <local path to file downloaded in step #1> .\devenv.exe.config
    devenv /UpdateConfiguration
    

    你可以在这里查看他的全文

  • 5

    还有一个Visual Studio 2015 RC .

    问题使用“File-> New-> Project ..”抛出异常

    通过删除文件夹内容:“C:\ Users \ AppData \ Local \ Microsoft \ VisualStudio \ 14.0 \ ComponentModelCache”,按照Shittu Olugbenga的回答,8月10日 .

    重新启动Visual Studio,它工作正常 . :) Tnx .

  • 2

    唯一对我有用的是修复SQL Server数据工具(转到卸载程序并选择更改/修复)

    enter image description here

  • 18

    在我的情况下 NugetPackage ,问题可能是由于在安装VS2015(共存)后安装VS2013 . 我解决它的方法是重新安装 NuGet Package Manager for Visual Studio 2015 (在工具>扩展和更新...中)

  • 1

    启动Microsoft Visual Studio Enterprise 15预览版(版本15.0.25123)时,出现相同的错误:

    <entry>
        <record>27</record>
        <time>2016/05/02 12:26:57.451</time>
        <type>Error</type>
        <source>VisualStudio</source>
        <description>SetSite failed for package [Image Service Package]Source:
     ..
        <guid>{1491E936-6FFE-474E-8371-30E5920D8FDD}</guid>
        <hr>80131522</hr>
        <errorinfo></errorinfo>
    </entry>
    

    我试着change the registry key,但它没有用 .

    我真的没有工作,卸载以前的版本,但尝试它,它的工作!

    Uninstall Microsoft Visual Studio Ultimate 2015 Preview, (Version 14.0.23310)
    

    它工作(对我:))

    我也运行了上述所有提示 . 我不知道是否有必要 . 亲切的问候 .

  • 8

    升级到新的Resharper 2016.2后我遇到了同样的问题 . 我通过在Visual Studio中暂停resharper来解决问题(工具>选项> Resharper>挂起)

相关问题