繁体   English   中英

在 MAC OS X 中安装 Visual Studio 失败

[英]Visual Studio installation failed in MAC OS X

首先从https://visualstudio.microsoft.com/vs/mac/下载 Visual Studio 安装程序并开始下载和安装过程。

在安装过程结束时,出现了以下错误。 所有事情都以管理员权限运行。

Installation of 'Visual Studio' failed with exception.
MacInstaller.Models.Installer.InstallException: Failed to copy application directory to its destination by NSFileManager. 'path': /private/tmp/dmg.lNyJgV/Visual Studio.app, 'applicationPath': /Applications/Visual Studio.app
  at MacInstaller.Core.Installer.InstallationProvider.InstallApp (System.String path, System.Boolean needsPrivileges) [0x00163] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/InstallationProvider.cs:254 
  at MacInstaller.Core.Installer.InstallationProvider.InstallDmg (System.String path, System.Boolean needsPrivileges) [0x00176] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/InstallationProvider.cs:144 
  at MacInstaller.Core.Installer.InstallationProvider.Install (System.String path, System.Boolean needsPrivileges) [0x00044] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/InstallationProvider.cs:49 
  at MacInstaller.Core.Installer.BaseSoftwareItem.Install (System.String filePath) [0x00000] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/SoftwareItems/BaseSoftwareItem.cs:132 
  at MacInstaller.Core.Installer.BaseSoftwareItem.Install (MacInstaller.Models.Downloader.DownloadServiceWorkItem download) [0x000a1] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/SoftwareItems/BaseSoftwareItem.cs:123 
  at MacInstaller.Core.Installer.BaseSoftwareItem.Install () [0x00007] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/SoftwareItems/BaseSoftwareItem.cs:107 
  at MacInstaller.Core.Installer.IDEBaseSoftwareItem.Install () [0x00000] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/SoftwareItems/IDEBaseSoftwareItem.cs:50 
  at MacInstaller.InstallationViewController.InstallItems () [0x000bf] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Views/Pages/InstallationViewController.cs:361 

现在,我一直在努力尝试用不同的组合来设置它。

开发环境

  • 操作系统版本:Mojave (10.14.5)
  • xCode 版本:10.2.1
  • Visual Studio for mac v8.5.2(内部版本 13)
  • .NET 核心 SDK:3.1.201
  • .NET 核心运行时:2.1.16

事情到此为止

参考链接

以上都不适合我,任何建议将不胜感激。

找到了解决方法。

  1. 通过以下屏幕后, Visual Studio for Mac安装程序将下载安装 Visual Studio 所需的所有组件,这些组件将存储在您的/Users/user-name/Library/VisualStudioInstaller/downloads

在此处输入图像描述


  1. 您可以使用快捷键cmd+shift+g直接导航到此处

在此处输入图像描述


  1. 然后运行安装并等待失败。 /Users/user-name/Library/Logs/VisualStudioInstaller找到日志报告,其中包含所有通过和失败的步骤。 取决于失败点,您可以选择要做什么。

     ... [2020-04-08 09:42:00.706] [inf] Software item 'Mono Framework' installed successfully. [2020-04-08 09:42:00.707] [inf] Installing software item 'Visual Studio' [2020-04-08 09:42:58.159] [dbg] Is '/Applications' writable? - True [2020-04-08 09:42:58.955] [dbg] Copying application via 'NSFileManager' [2020-04-08 09:55:17.286] [inf] Check xcode dependencies. [2020-04-08 09:55:17.420] [inf] Enqueueuing and starting downloads. [2020-04-08 09:55:17.420] [inf] Start the installation process. [2020-04-08 09:55:17.422] [inf] Installing software item 'Visual Studio' [2020-04-08 09:55:17.878] [dbg] Is '/Applications' writable? - True [2020-04-08 09:55:17.879] [dbg] Existing app will be backed up in '/Applications/Visual Studio (old).app' [2020-04-08 09:55:17.879] [dbg] Making backup of application via `NSFileManager`. [2020-04-08 09:55:17.970] [err] Copying process failed with 'The file “switch_thumb_activated_holo_dark.9.png” doesn't exist.' [2020-04-08 09:55:18.553] [dbg] Copying application via 'NSFileManager' [2020-04-08 09:55:18.873] [err] Copying process failed with 'The file “Info.plist” doesn't exist.' [2020-04-08 09:55:18.956] [exc] Installation of 'Visual Studio' failed with exception. MacInstaller.Models.Installer.InstallException: Failed to copy application directory to its destination by NSFileManager. 'path': /private/tmp/dmg.lNyJgV/Visual Studio.app, 'applicationPath': /Applications/Visual Studio.app at MacInstaller.Core.Installer.InstallationProvider.InstallApp (System.String path, System.Boolean needsPrivileges) [0x00163] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/InstallationProvider.cs:254 at MacInstaller.Core.Installer.InstallationProvider.InstallDmg (System.String path, System.Boolean needsPrivileges) [0x00176] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/InstallationProvider.cs:144 at MacInstaller.Core.Installer.InstallationProvider.Install (System.String path, System.Boolean needsPrivileges) [0x00044] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/InstallationProvider.cs:49 at MacInstaller.Core.Installer.BaseSoftwareItem.Install (System.String filePath) [0x00000] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/SoftwareItems/BaseSoftwareItem.cs:132 at MacInstaller.Core.Installer.BaseSoftwareItem.Install (MacInstaller.Models.Downloader.DownloadServiceWorkItem download) [0x000a1] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/SoftwareItems/BaseSoftwareItem.cs:123 at MacInstaller.Core.Installer.BaseSoftwareItem.Install () [0x00007] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/SoftwareItems/BaseSoftwareItem.cs:107 at MacInstaller.Core.Installer.IDEBaseSoftwareItem.Install () [0x00000] in/Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Core/Installer/SoftwareItems/IDEBaseSoftwareItem.cs:50 at MacInstaller.InstallationViewController.InstallItems () [0x000bf] in /Users/runner/runners/2.165.2/work/1/installer/MacInstaller.Universal/Views/Pages/InstallationViewController.cs:361...
  2. 清楚地阅读日志报告中的失败原因。 在我的情况下,问题是使用 NSFileManager 移动文件,并且日志文件显示组件的 rest 已正确安装。

因此,从步骤 2 中解释的下载目录手动安装了visualstudioformac-8.5.2.13.dmg 。这对我有用。

我遇到了类似的问题。 由于 macOS 在安装时需要复制文件的权限,但由于某些原因未显示弹出窗口,因此无法复制。 因此,单击重试,直到出现一个输入登录用户密码的弹出窗口。

安装Visual Studio 2022 for Mac (Preview)相同问题

在我的情况下,将下载的.dmg安装为sudo并像往常一样通过Finder运行安装程序。

sudo hdiutil attach lalala.dmg

这很奇怪,我遇到了同样的问题,我所做的是每次都点击“重试”按钮,直到弹出 window 要求您输入密码以获得许可。 然后它就不会再失败了......

我实际上发现该应用程序无论如何都在复制到应用程序中,所以只需等待它完成复制,然后弹出密码对话框并单击重试即可。 继续点击重试的问题在于它每次都会创建应用程序的副本

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM