'Visual Studio installation failed in MAC OS X
Downloaded Visual Studio installer from https://visualstudio.microsoft.com/vs/mac/ first and started the download and install process.
At the end of the installation process, it came up with the following error. all things were run with admin permissions.
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
For now, I have been struggling a complete day trying to set up this with different combinations.
Dev environment
- OS version : Mojave (10.14.5)
- xCode version : 10.2.1
- Visual Studio for mac v8.5.2 (build 13)
- .NET Core SDK : 3.1.201
- .NET Core Runtime : 2.1.16
Things did so far
- removed all the partially installed files and did a clean install. https://social.msdn.microsoft.com/Forums/en-US/6a94b169-82c3-4ace-8de1-0c090e67a198/cant-install-mac-visual-studio-2019-community?forum=vssetup
- Installing by removed different component combinations(Android, iOS SDK, .netCore)
referred links
- http://dotnet.community/threads/cant-install-mac-visual-studio-2019-community.131734/
- https://developercommunity.visualstudio.com/content/problem/55238/visual-studio-for-mac-installation-error.html
none of above is worked for me, any suggestions would be appreciated.
Solution 1:[1]
I came across the similar problem. Because macOS needs a permission to copy files while installing but for some reasons a popup doesn't show, it's failed to copy. Therefore, click retry until a pop up appears to type the password of logged user.
Solution 2:[2]
Found a workaround for this.
- Visual Studio for Mac installer will download all the components needed to install Visual Studio once you pass the following screen, Which will be stored in your
/Users/user-name/Library/VisualStudioInstaller/downloads
- You can directly navigate here using shortcut
cmd+shift+g
Then run the installation and waited for failing. find the Log report at
/Users/user-name/Library/Logs/VisualStudioInstaller
and that contains all the steps passed and failed. Depends on the failing point you can choose what to do.... [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 ...
Read the reason for the failure in log report clearly. In my case issue is moving files with NSFileManager and the log file shows that the rest of the components are installed correctly.
So manually installed the visualstudioformac-8.5.2.13.dmg
from the downloaded directory explained in step 2. that worked for me.
Solution 3:[3]
Same issue installing Visual Studio 2022 for Mac (Preview)
What worked in my case was mounting the downloaded .dmg
as sudo
and running the installer as usual via Finder
.
sudo hdiutil attach lalala.dmg
Solution 4:[4]
this is quite weird, I encountered the same issue and what I did was keep clicking the "retry" button every time till it popped up the window that required you to enter password for permission. And then it won't fail anymore...
Solution 5:[5]
I actually found out that the app was copying anyways into Applications, so just waited for it to finish the copy and then the password dialog popped up and clicked retry and worked. The problem with keep clicking retry was that it created a copy of the app every time
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Nguyen Nam Nhi |
Solution 2 | Omal Perera |
Solution 3 | c_thane |
Solution 4 | Dan Li |
Solution 5 | David Valdespino |