首先从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
就目前而言,我一直在努力奋斗一整天,尝试以不同的组合进行设置。
开发环境
到目前为止一切正常
引荐链接
以上都不适合我,任何建议将不胜感激。
答案 0 :(得分:0)
为此找到了解决方法。
/Users/user-name/Library/VisualStudioInstaller/downloads
中cmd+shift+g
然后运行安装并等待失败。
在/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
...
在日志报告中清楚地读取失败原因。就我而言,问题是使用NSFileManager移动文件,日志文件显示其余组件已正确安装。
因此从第2步中说明的下载目录中手动安装了visualstudioformac-8.5.2.13.dmg
。
答案 1 :(得分:0)
我遇到了类似的问题。由于macOS在安装时需要复制文件的权限,但是由于某些原因,不会显示弹出窗口,因此复制失败。因此,单击重试,直到出现弹出窗口以键入登录用户的密码。