.NET Core 1.0开发安装VS2015工具报错

Errors while installing VS2015 tools for .NET Core 1.0 development

我很难更新我的开发机器以使用最新的 Visual Studio 工具来支持我的开发。

我做了以下操作(VS2015 表示 Visual Studio 2015 社区版):

  1. 卸载我以前的 VS2015 Update 1 版本。我应该提一下,我已经在此之上安装了各种东西,例如 AspNet5.ENU.RC1_Update1_KB3137909.exe 和 VWDOrVs2015AzurePack.exe(Azure 的 VS 工具)。

  2. 重启

  3. 使用此文件安装 VS2015 vs_community__55e913f53149d443afc7d14b09172fd9.exe。这以

    等小错误结束

    [0EE0:0E48][2016-08-10T11:42:51]i301:正在应用执行包:MobileServicesConnectedServices_VS,操作:安装,路径:C:\ProgramData\Package 缓存{A4495E4F- 5218-48FB-8AD2-F3076011B9E1}v14.0.23107\packages\MobileServicesConnectedServices\MobileServicesConnectedServices_VisualStudio14.msi,参数:'ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" NOVSUI="1"' [16DC:16E0][2016-08-10T11 :42:58]i000: MUX: ExecuteError: Package (MobileServicesConnectedServices_VS) failed: Error Message Id: 1722 ErrorMessage: 此 Windows 安装程序包有问题。作为设置一部分的程序 运行 未按预期完成。请联系您的支持人员或软件包供应商。
    [0EE0:0E48][2016-08-10T11:42:58]e000:错误 0x80070643:无法安装 MSI 包。

[0EE0:0E48][2016-08-10T11:42:45]i301: Applying execute package: AuthenticationConnectedServices_VS, action: Install, path: C:\ProgramData\Package Cache\{3FEAC561-1CF6-41D6-B0F3-BECDD9C88A1B}v14.0.23107\packages\AuthenticationConnectedServices\AuthenticationConnectedServices_VisualStudio14.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" NOVSUI="1"' [16DC:16E0][2016-08-10T11:42:50]i000: MUX:  ExecuteError: Package (AuthenticationConnectedServices_VS) failed: Error Message Id: 1722 ErrorMessage: There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  
[0EE0:0E48][2016-08-10T11:42:51]e000: Error 0x80070643: Failed to install MSI package.
  1. 重启

现在,如果我尝试从名为 DotNetCore.1.0.0-VS2015Tools.Preview2.exe 的文件安装 VS2015 Tools Preview,我会收到此错误:

Setup has detected that Visual Studio 2015 Update 3 may not be completely installed. Please repair Visual Studio 2015 Update 3, then install this product again.

当我打开日志文件时,我看到了这个:

[1B14:1A6C][2016-08-10T12:58:43]e000: Error 0x81f40001: Bundle condition evaluated to false: WixBundleInstalled OR NOT(((VS2015CommunityUpdateVersion <> VS2015UpdateVersion) AND (VS2015CommunityExists) AND (VS2015UpdateVersionExists)) OR ((VS2015ProfessionalUpdateVersion <> VS2015UpdateVersion) AND (VS2015ProfessionalExists) AND (VS2015UpdateVersionExists)) OR ((VS2015EnterpriseUpdateVersion <> VS2015UpdateVersion) AND (VS2015EnterpriseExists) AND (VS2015UpdateVersionExists)) OR ((VS2015WebExpressUpdateVersion <> VS2015UpdateVersion) AND (VS2015WebExpressExists) AND (VS2015UpdateVersionExists))) OR (SKIP_VSU_CHECK=1) OR (WixBundleAction=2)

我现在正尝试使用全新 Windows 10 安装从头开始安装,以避免与早期安装的副作用相关的问题。

虽然我很好奇,但可能会导致这些问题,并找出我是否做错了什么。

编辑 2016-08-10:我现在已经确认在新安装的 Windows 10 上会出现同样的错误。

经过更多挖掘,我找到了解决方案。事实证明,很多人都遇到过这个问题,如下所述: (单击评论选项卡):

https://visualstudiogallery.msdn.microsoft.com/c94a02e9-f2e9-4bad-a952-a63a967e3935

从命令提示符尝试此操作后:

DotNetCore.1.0.0-VS2015Tools.Preview2.exe SKIP_VSU_CHECK=1

安装继续。

以上对我不起作用,我在网上找到的其他几个解决方案也不起作用,但这最终起作用了:

  1. 转到扩展文件夹,例如C:\Program 文件 (x86)\Microsoft Visual Studio14.0\Common7\IDE\Extensions
  2. 将会有很多神秘命名的文件夹,例如"kehkjkd2.pme"
  3. 打开每个文件夹,看看它是否是一个 nuget 扩展文件夹(如果它包含 ~40 个名为 nuget.*.dll 的文件)
  4. 如果是nuget扩展文件夹,将其删除或移至备份文件夹。
  5. 重复 - 可能有多个包含 nuget 的文件夹。

完成上述操作并重启后(不确定是否需要重启),.NET Core 1.0.0 VS 2015 Tooling Preview 2 安装成功。