Reputation: 3109
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
Things did so far
referred links
none of above is worked for me, any suggestions would be appreciated.
Upvotes: 1
Views: 7679
Reputation: 1
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
Upvotes: 0
Reputation: 1
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...
Upvotes: 0
Reputation: 385
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
Upvotes: 0
Reputation: 19
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.
Upvotes: 1
Reputation: 3109
Found a workaround for this.
/Users/user-name/Library/VisualStudioInstaller/downloads
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.
Upvotes: 2