Search code examples
macosmacos-sierravisual-studio-mac

Error installing Visual Studio for mac


I have a MacBook Air with macOS Sierra 10.12.5. I'm getting the following error trying to install Visual Studio for Mac:

Initial task interrupted by exception Access to the path "/Users/username/.config/xbuild" is denied. Exception type: System.UnauthorizedAccessException Message: Access to the path "/Users/username/.config/xbuild" is denied. at Xamarin.Web.Installer.TasksManager.DetectComponents () [0x000a1] in /Users/builder/data/lanes/4852/1d420fd9/source/installer/Xamarin.Web.Installer/TasksManager.cs:306

Thanks for your help.


Solution

  • Building on @Elvermg's comment with more details:

    I ran:

    $ ls -la ~ | grep .config
    
    drwxr-xr-x    5 root  staff         170 22 Jun 15:08 .config
    

    This confirmed the same issue.

    I changed the owner of the ~/.config directory:

    sudo chown [username]:staff ~/.config/
    

    Problem solved.