簡體   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