无法安装Microsoft.Nuget.VisualStudio.Core ReturnCode 1603

时间:2019-01-10 22:49:07

标签: visual-studio visual-studio-2017 nuget

我在安装Visual Studio的最新版vs2017社区安装程序时遇到了麻烦。

Package 'Microsoft.VisualStudio.NuGet.Core,version=15.0.40902.5706' failed to install.
    Search URL
        https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualStudio.NuGet.Core;PackageAction=Install;ReturnCode=1603
    Details
        Return code: 1603
        Return code details: Fatal error during installation.
    Log
        C:\Users\myuseraccount\AppData\Local\Temp\dd_setup_20190110143209_001_Microsoft.VisualStudio.NuGet.Core.log
    Impacted workloads
        .NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.8.27906.1)
        .NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop,version=15.8.27906.1)
        ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.8.27906.1)
        Azure development (Microsoft.VisualStudio.Workload.Azure,version=15.8.27906.1)
        Data storage and processing (Microsoft.VisualStudio.Workload.Data,version=15.6.27309.0)
        Desktop development with C++ (Microsoft.VisualStudio.Workload.NativeDesktop,version=15.9.28307.102)
        Game development with Unity (Microsoft.VisualStudio.Workload.ManagedGame,version=15.0.27005.2)
        Mobile development with .NET (Microsoft.VisualStudio.Workload.NetCrossPlat,version=15.9.28107.0)
        Mobile development with JavaScript (Microsoft.VisualStudio.Workload.WebCrossPlat,version=15.7.27625.0)
        Node.js development (Microsoft.VisualStudio.Workload.Node,version=15.9.28107.0)
        Office/SharePoint development (Microsoft.VisualStudio.Workload.Office,version=15.8.27924.0)
        Universal Windows Platform development (Microsoft.VisualStudio.Workload.Universal,version=15.9.28307.102)
    Impacted components
        .NET Core 2.0 development tools (Microsoft.NetCore.ComponentGroup.DevelopmentTools,version=15.8.27729.1)
        .NET Core 2.1 development tools (Microsoft.NetCore.ComponentGroup.DevelopmentTools.2.1,version=15.8.27924.0)
        .NET Core 2.1 development tools (Microsoft.NetCore.ComponentGroup.Web.2.1,version=15.8.27924.0)
        .NET desktop development tools (Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites,version=15.7.27625.0)
        ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.8.27825.0)
        ASP.NET and web development tools prerequisites (Microsoft.VisualStudio.ComponentGroup.Web,version=15.9.28219.51)
        Azure Cloud Services core tools (Microsoft.VisualStudio.Component.Azure.Waverton,version=15.9.28107.0)
        Azure Cloud Services tools (Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices,version=15.0.26504.0)
        Azure Data Lake and Stream Analytics Tools (Microsoft.Component.Azure.DataLake.Tools,version=15.9.28107.0)
        Azure development prerequisites (Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites,version=15.9.28107.0)
        Azure Resource Manager core tools (Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools,version=15.9.28107.0)
        Azure Resource Manager tools (Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools,version=15.0.27005.2)
        Cloud tools for web development (Microsoft.VisualStudio.ComponentGroup.Web.CloudTools,version=15.8.27729.1)
        Data sources for SQL Server support (Microsoft.VisualStudio.Component.SQL.DataSources,version=15.0.26621.2)
        Developer Analytics tools (Microsoft.VisualStudio.Component.AppInsights.Tools,version=15.8.27825.0)
        F# language support (Microsoft.VisualStudio.Component.FSharp,version=15.8.27825.0)
        F# language support for web projects (Microsoft.VisualStudio.Component.FSharp.WebTemplates,version=15.8.27705.0)
        Managed Desktop Workload Core (Microsoft.VisualStudio.Component.ManagedDesktop.Core,version=15.8.27729.1)
        Microsoft Azure WebJobs Tools (Component.Microsoft.VisualStudio.Web.AzureFunctions,version=15.7.27617.1)
        Microsoft Azure WebJobs Tools (Microsoft.VisualStudio.ComponentGroup.AzureFunctions,version=15.7.27617.1)
        Mobile development with JavaScript core features (Microsoft.VisualStudio.Component.Cordova,version=15.0.26606.0)
        Node.js development support (Microsoft.VisualStudio.Component.Node.Tools,version=15.8.27825.0)
        NuGet package manager (Microsoft.VisualStudio.Component.NuGet,version=15.9.28016.0)
        Office Developer Tools for Visual Studio (Microsoft.VisualStudio.Component.Sharepoint.Tools,version=15.8.27924.0)
        Redgate SQL Search (Component.Redgate.SQLSearch.VSExtension,version=3.1.7.2062)
        SQL Server Data Tools (Microsoft.VisualStudio.Component.SQL.SSDT,version=15.9.28107.0)
        Test Adapter for Google Test (Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest,version=15.8.27906.1)
        Testing tools core features (Microsoft.VisualStudio.Component.TestTools.Core,version=15.7.27520.0)
        Universal Windows Platform tools (Microsoft.VisualStudio.Component.UWP.Support,version=15.9.28119.51)
        Universal Windows Platform tools for Cordova (Microsoft.VisualStudio.ComponentGroup.UWP.Cordova,version=15.9.28307.102)
        Universal Windows Platform tools for Xamarin (Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin,version=15.9.28307.102)
        Visual Studio Tools for Office (VSTO) (Microsoft.VisualStudio.Component.TeamOffice,version=15.7.27625.0)
        Visual Studio Tools for Unity (Microsoft.VisualStudio.Component.Unity,version=15.7.27617.1)
        Windows Communication Foundation (Microsoft.VisualStudio.Component.Wcf.Tooling,version=15.8.27924.0)
        Windows Workflow Foundation (Microsoft.VisualStudio.Component.Workflow,version=15.8.27825.0)
        Xamarin (Component.Xamarin,version=15.8.27906.1)

我不太确定为什么会这样。我尝试进行Windows的全新安装-无法正常工作;我尝试去URL here from MSFT,从搜索中得到0个结果。

打开VS的最终结果是Visual Studio几乎没有工具可用于创建新的ASP.NET项目,C#桌面项目等。

这是日志文件转储:

[19ac:0030][2019-01-10T14:36:03] Opening the package for processing
[19ac:0030][2019-01-10T14:36:03] Using package payload to get the embedded manifest
[19ac:0030][2019-01-10T14:36:03] Error 0x80131509: Error processing vsix manifest: System.InvalidOperationException: Specified part does not exist in the package.
   at System.IO.Packaging.Package.GetPart(Uri partUri)
   at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.GetEmbeddedVsixPackageFromPayload(Package package, ILogger logger)
   at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.GetEmbeddedVsixPackage(IPackageIdentity vsix, Package package, ExecuteAction action, ILogger logger, Boolean isManifestCached)
   at System.IO.Packaging.Package.GetPart(Uri partUri)
   at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.GetEmbeddedVsixPackageFromPayload(Package package, ILogger logger)
   at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.GetEmbeddedVsixPackage(IPackageIdentity vsix, Package package, ExecuteAction action, ILogger logger, Boolean isManifestCached)

Installer Error

missing tooling error

2 个答案:

答案 0 :(得分:0)

  

无法安装Microsoft.Nuget.VisualStudio.Core ReturnCode 1603

根据错误日志,问题应该是Visual Studio无法正确安装NuGet扩展程序包。要解决此问题,您应该打开安装程序以重新安装NuGet扩展。

  • 修改安装程序。
  • 切换到单个组件。
  • 在代码工具下,取消选中NuGet程序包管理器。
  • 关闭安装程序,然后重新打开它,重新检查NuGet软件包管理器。

enter image description here

如果没有帮助,或者您无法修改安装程序,请尝试修复或重新安装 Visual Studio,以解决此问题。

希望这会有所帮助。

答案 1 :(得分:0)

TLDR; ; Visual Studio在隐藏的 C:\ ProgramData \ Microsoft \ VisualStudio 目录下创建一个Packages文件夹。查看错误日志后,我发现用于NuGet的软件包已损坏。尝试删除您的packages文件夹,看看是否可以清除安装;否则,只需遵循上面的所有内容即可。


花了很多时间在这里,这实际上是解决问题的方法。

  1. C:\ ProgramData \ Microsoft \ VisualStudio-在此处删除Packages文件夹。
  2. C:\ Program Files(x86)\ Microsoft Visual Studio-删除文件夹2017,安装程序和共享。基本上,VS 2017安装目录下的所有内容。
  3. 重新运行VS 2017的安装程序。
  4. NuGet.Core应该这次安装。

我从布局(离线安装)中安装了Visual Studio-有关如何执行此操作的详细信息here。我建议您创建一个布局文件(基本上是一个ISO),以免遇到上面的问题。

-适用于当前预览版本的问题

我在使用Visual Studio 2019预览版时也遇到了错误。我所做的修复工作是创建2019版的布局(脱机安装程序),并从ProgramData子目录(C:\ ProgramData \ Microsoft \ VisualStudio)中删除了破坏我安装的软件包。然后,我使用--noWeb选项运行了安装程序,它可以正常工作。感谢Microsoft使我们能够创建布局!!!!