安装Visual Studio 2015 RTM后未加载包

Dan*_*aan 95 visual-studio visual-studio-2015

问题

我安装了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>
Run Code Online (Sandbox Code Playgroud)

对于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>
Run Code Online (Sandbox Code Playgroud)

对于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>
Run Code Online (Sandbox Code Playgroud)

对于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>
Run Code Online (Sandbox Code Playgroud)

到目前为止我尝试过的

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

更新问题

第一次更新

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

第二次更新

这就是我的程序和功能的样子: 程序和功能的屏幕截图

第三次更新

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

  • 删除了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仍然无法加载上面的包! 因此,如果有人从上面的屏幕截图中获得关于哪些程序可以完全卸载的更多信息,我将非常高兴.

第四次更新

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

  • 删除了AppData\Roaming\Microsoft\VisualStudio\14.0中的所有内容
  • 删除了AppData\Local\VisualStudio\14.0中的所有内容
  • 从ProgramData中删除有关Visual Studio 14.0的所有内容
  • 通过程序和功能卸载Visual Studio 2015(屏幕截图)
  • 本文所说的一切都是:https: //support.microsoft.com/nl-nl/kb/3016536
  • 完全删除了Program Files文件夹中的Visual Studio Secondary Installer文件夹
  • 基本上从Program Files中删除了与Visual Studio 14.0有关的任何内容.在程序和功能中卸载时遗留的任何内容.
  • 卸载Microsoft Visual C++可再发行组件(x86) - 14.0.xxx
  • 卸载了我的Xamarin东西
  • 希望我没有忘记任何事情,但底线是完全摆脱视觉工作室2015相关的任何东西.
  • 重新安装visual studio 2015 RTM,现在应该可以使用了.我必须再次安装一些第三方的东西,但至少它有效!

Shi*_*nga 190

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

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

  1. 关闭Visual Studio的所有实例
  2. 删除此文件夹中的所有内容 C:\Users\%username%\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache
  3. 重新启动Visual Studio

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

UPDATE

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

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

  • 用VS2015教授RTM为我解决了这个问题 (4认同)
  • 在将Visual Studio 2015更新到Update 3之后,这也有效,打破了我的Extension Manager,但这已将其整理出来,谢谢! (4认同)
  • 确认在Visual Studio 2015中工作.绝对值得一个upvote. (3认同)
  • 这个答案也解决了我得到的错误,"'XamarinIOSPackage'软件包没有正确加载".谢谢! (3认同)
  • 我重新安装后工作正常.只是将目录重命名为安全而不是删除 (3认同)

Ser*_*hon 49

还有一个解决方法 c:\Users\{User_Name}\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config

  1. 打开 System.Collections.Immutable
  2. 更改绑定重定向newVersion,1.1.37.0应该是1.1.36.0(不是ActivityLog.xml).

重定向应如下所示:

    <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>
Run Code Online (Sandbox Code Playgroud)

错误来自c:\Users\{User_Name}\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config:

软件包[CSharpPackage]的SetSite失败[无法加载文件或程序集'System.Collections.Immutable,Version = 1.1.36.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'或其依赖项之一.定位的程序集的清单定义与程序集引用不匹配.(来自HRESULT的异常:0x80131040)]:{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)}

您可以在我的博客文章如何在Update 1之后恢复Visual Studio 2015后阅读有关如何解决此类问题的更多信息

  • 这也适用于Atmel Studio 7.0(基于VS2015 shell). (4认同)
  • @lego仅供参考,需要更正的配置文件是`AtmelStudio.exe.config`,位于`AppData\Local\Atmel\AtmelStudio\7.0下 (2认同)

Tom*_*ord 29

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

  1. C:\Users\<your users name>\AppData\Local\Microsoft\VisualStudio\14.0
  2. C:\Users\<your users name>\AppData\Roaming\Microsoft\VisualStudio\14.0

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


小智 18

由于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

  • 运行"devenv/clearcache devenv/updateconfiguration"也适合我. (4认同)

小智 8

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

C:\用户{用户名} \应用程序数据\本地\微软\ VisualStudio的\ 14.0

我不得不删除所有内容

C:\用户{用户名} \应用程序数据\本地\微软\ VisualStudio的\ vshub

我没有必要触摸漫游文件夹中的任何内容,但这可能因用户而异.


Ahm*_*aly 5

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

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

就是这个

  1. 通过以下链接将正确的VSUpdate 1配置下载到您计算机上的文件夹:https://download.microsoft.com/download/2/7/6/276D15B2-6851-42AA-8D1F-639CD3FC84BE/devenv-exe-config- update1.xml
  2. 打开管理命令提示符并运行这些步骤(假设您已安装到默认位置):

    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
    
    Run Code Online (Sandbox Code Playgroud)

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