Visual Studio 2019 - Anyone find a good deployment method?

CSCC-JS
Contributor II

Has anyone found a good way to deploy Microsoft Visual Studio 2019?

Microsoft currently does not have a full macOS package of Visual Studio 2019.
Trying to get the full package via Unity still gives the previous version (as of 2019.1.8f1).

The only think I've thought of is trying composer snap shot, then referencing the uninstall scripts to make sure I don't prune anything - https://docs.microsoft.com/en-us/visualstudio/mac/uninstall?view=vsmac-2019

I was also thinking, install the previous version, and see if there's a way to automate the upgrade?

6 REPLIES 6

hdsreid
Contributor III

Are you trying to cache everything to one location on your network for an install to conserve bandwidth, or are you just looking for an easy way to deploy? Microsoft at the moment says there is no way to make an offline installer like they have for Windows: https://visualstudio.microsoft.com/vs/support/mac/install-visual-studio-mac-offline/

if bandwidth isn't much of a concern, you could upload the dmg and run a script to start the installation running as your management account

CSCC-JS
Contributor II

Easy way to deploy, have unlimited bandwidth resources.
I could not find a complete dmg file, just the installer that downloaded the rest, and could not find a way to automate it via script.

While working on Facebook React Native CLI deployment, which in part uses Homebrew (https://brew.sh/) and noticed in the formulas (https://formulae.brew.sh/cask/) saw visual studio recipe, running it reveled FULL dmg file which I can deploy.

Download Links

MonoFrameWork
https://www.mono-project.com/download/stable/

.Net Core for VS
https://docs.microsoft.com/en-us/visualstudio/mac/net-core-support?view=vsmac-2019

Visual Studio 2019 Core App
https://dl.xamarin.com/VsMac/VisualStudioForMac-8.1.3.19.dmg (553mb)

Since it appears the core app is drag to application folder, a lot of the decencies may be mono / Xamarin related.

Xamarin Profiler
https://docs.microsoft.com/en-us/xamarin/tools/profiler/?tabs=macos

Xamarin Inspector & Workbook
https://docs.microsoft.com/en-us/xamarin/tools/inspector/release-notes/1.5

I don't need the Xamarin additional software, still trying to track down following related packages
com.xamarin.android.pkg
com.xamarin.monotouch.pkg
com.xamarin.xamarin-ios-build-host.pkg

KyleEricson
Valued Contributor

@CSCC-JS  Thanks for the links this is what I came up with in Composer.


2022-01-20_11-03-58.png

#!/bin/zsh
# Created by Kyle Ericson
# Visual Studio 2019

if [[ $(arch) != "i386" ]]; then
        echo "M1"
        /usr/sbin/installer -pkg "/tmp/VS/dotnet-sdk-6.0.101-osx-arm64.pkg"  -target /
	

    else
        echo "Intel"
        /usr/sbin/installer -pkg "/tmp/VS/dotnet-sdk-6.0.101-osx-x64.pkg"  -target /
    fi
  
/usr/sbin/installer -pkg "/tmp/VS/MonoFramework-MDK-6.12.0.122.macos10.xamarin.universal.pkg" -target /
/usr/sbin/installer -pkg "/tmp/VS/profiler-mac-1.6.13-11.pkg" -target /
/usr/sbin/installer -pkg "/tmp/VS/XamarinInteractive-1.5.0.pkg" -target /

exit 0

 

Read My Blog: https://www.ericsontech.com

Thanks for capturing this Kyle it has been super helpful. One of our Developers mentioned that when using the Web API, Web Application, Web Application (Model-View-Controller) template nothing happens and the New Project window just hangs. Have you experienced this? 

Turns out the issue was .Net 6. Seems visual studio only likes 3 and 5: https://docs.microsoft.com/en-us/visualstudio/mac/uninstall-net-2019?view=vsmac-2019

johntgeck
New Contributor III

Hi there, did creating a Composer package work for you? I'm trying to get the Visual Studio (Preview) v17.5.0.1766 working on a lab running MacOS Ventura 13.0 and my policy is failing to install. Built the package using a New & Modified Snapshot. After the first failure I rebuilt the package with all permissions set to 777 (owner: root, group: wheel) just in case, reuploaded to Jamf Admin, rebuilt the policy with the new package, redeployed and got the same message. No further info in the install log or jamf logs on the device.

Copied from policy results:

 

Installing Visual Studio for Mac 17.5.0.110.pkg...
Installation failed. The installer reported: installer: Package name is Visual Studio for Mac 17.5.0.110
installer: Installing at base path /
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An unexpected error occurred while moving files to the final destination.)