Forum Discussion
install Visual Studio Professional intune
Hello,
I have tried to install visual studio professional 2022 in intune after executing the following steps: https://www.systemsmaven.com/post/deploying-visual-studio-with-microsoft-endpoint-manager-intune
When installing it from the company portal I get an installation error.
Detection rules:
C:\Program Files (x86)\Microsoft Visual Studio\Installer
File: vs_installer.exe and I have also tried devenv.exe
But after doing it it does not install. I tried to install it from the intune microsoft store but it says The selected app does not have a valid newer package version / This app is not supported in the preview version.
- RickGroomCopper Contributor
There appears to be several ways to deploy Visual Studio via Intune, found online. Unfortunately, the Visual Studio installation is not straightforward since it still requires an absolute reference path to the Configuration file. I'm sure Microsoft is aware of the issue since there are dozens for forums expressing this problem. While scripts are a great tool, I always prefer to keep my Intune application installations as clean and repurposable as possible. I opted for using the simple %CD% variable to identify the installation's current directory for install, remember to quote the path in case the expanded path contains spaces. Intune downloads the payload to an unpredictable location and the command simply returns its own current path for the Configuration file.
Install Command: cmd.exe /c VisualStudioSetup.exe --config "%CD%\2022.vsconfig" --downloadThenInstall --quiet --wait
Uninstall Command: "C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe" /uninstall /quiet
Detection Rules*:
Rule Type: File
Path: C:\Program Files\Microsoft Visual Studio\2022
File or Folder: Professional
Detection Method: File or folder exists
*You can be as specific as you'd like here. Above simply checks for a folder (which could be empty, so not a great determination if software is installed), however it was simple for us since our developers have multiple editions of Visual Studio installed in parallel. Others may want to detect the executable or even the executables version string.
Best of Luck!
- andrewbailey375Copper Contributor
Hi Both, I feel i'm in a similar situation here.
Did you ever get to a solution?
I have also tried to deploy like suggested here: https://www.systemsmaven.com/post/deploying-visual-studio-with-microsoft-endpoint-manager-intune
But keep getting failures.
I don't understand how to now edit my setup to try and run it like ricks comment? my current install command is just install.cmd.
How am i now going to make it "Install Command: cmd.exe /c VisualStudioSetup.exe --config "%CD%\2022.vsconfig" --downloadThenInstall --quiet --wait" ?
Do I need to create a new install.intunewin file or can I use the one i created following the original thread?
- RickGroomCopper Contributor
When you package the IntuneWin, make sure the installer and configuration files are together. You can name them anything you want, as long as you call them by the same names in your install command.
You can generate the configuration file using the Export Installation Configuration option of the Visual Studio Installer. This will allow you to customize the installation settings and components that will be installed. Import or export installation configurations | Microsoft Learn
Here is mine to copy if you'd like, it includes all of the components requested from our developers. **It never did install the extensions, but I haven't had a chance to fix that yet.
{ "version": "1.0", "components": [ "Microsoft.VisualStudio.Component.CoreEditor", "Microsoft.VisualStudio.Workload.CoreEditor", "Microsoft.Net.Component.4.8.SDK", "Microsoft.Net.Component.4.7.2.TargetingPack", "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites", "Microsoft.VisualStudio.Component.TypeScript.TSServer", "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions", "Microsoft.VisualStudio.Component.JavaScript.TypeScript", "Microsoft.VisualStudio.Component.JavaScript.Diagnostics", "Microsoft.VisualStudio.Component.Roslyn.Compiler", "Microsoft.Component.MSBuild", "Microsoft.VisualStudio.Component.Roslyn.LanguageServices", "Microsoft.VisualStudio.Component.TextTemplating", "Component.Microsoft.VisualStudio.RazorExtension", "Microsoft.VisualStudio.Component.IISExpress", "Microsoft.VisualStudio.Component.NuGet", "Microsoft.VisualStudio.Component.MSODBC.SQL", "Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime", "Microsoft.VisualStudio.Component.Common.Azure.Tools", "Microsoft.VisualStudio.Component.SQL.CLR", "Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils", "Microsoft.Component.ClickOnce", "Microsoft.VisualStudio.Component.ManagedDesktop.Core", "Microsoft.VisualStudio.Component.SQL.SSDT", "Microsoft.VisualStudio.Component.SQL.DataSources", "Component.Microsoft.Web.LibraryManager", "Component.Microsoft.WebTools.BrowserLink.WebLivePreview", "Microsoft.VisualStudio.ComponentGroup.Web", "Microsoft.NetCore.Component.Runtime.8.0", "Microsoft.NetCore.Component.SDK", "Microsoft.VisualStudio.Component.FSharp", "Microsoft.ComponentGroup.ClickOnce.Publish", "Microsoft.NetCore.Component.DevelopmentTools", "Microsoft.VisualStudio.Component.FSharp.WebTemplates", "Microsoft.VisualStudio.Component.DockerTools", "Microsoft.NetCore.Component.Web", "Microsoft.VisualStudio.Component.WebDeploy", "Microsoft.VisualStudio.Component.AppInsights.Tools", "Microsoft.VisualStudio.Component.Web", "Microsoft.Net.Component.4.8.TargetingPack", "Microsoft.Net.ComponentGroup.4.8.DeveloperTools", "Microsoft.VisualStudio.Component.AspNet45", "Microsoft.VisualStudio.Component.AspNet", "Component.Microsoft.VisualStudio.Web.AzureFunctions", "Microsoft.VisualStudio.ComponentGroup.AzureFunctions", "Microsoft.VisualStudio.ComponentGroup.Web.CloudTools", "Microsoft.VisualStudio.Component.DiagnosticTools", "Microsoft.VisualStudio.Component.EntityFramework", "Microsoft.VisualStudio.Component.Debugger.JustInTime", "Component.Microsoft.VisualStudio.LiveShare.2022", "Microsoft.VisualStudio.Component.WslDebugging", "Microsoft.VisualStudio.Component.IntelliCode", "Component.GitHub.Copilot", "Microsoft.NetCore.Component.Runtime.6.0", "Microsoft.VisualStudio.Component.TeamsFx", "Microsoft.VisualStudio.ComponentGroup.AdditionalWebProjectTemplates", "microsoft.net.runtime.mono.tooling", "microsoft.net.sdk.emscripten", "wasm.tools", "Microsoft.Net.Component.4.8.1.SDK", "Microsoft.Net.Component.4.8.1.TargetingPack", "Microsoft.Net.ComponentGroup.4.8.1.DeveloperTools", "Microsoft.VisualStudio.Workload.NetWeb", "Microsoft.VisualStudio.Component.Azure.ClientLibs", "Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites", "Microsoft.Component.Azure.DataLake.Tools", "Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools", "Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools", "Microsoft.VisualStudio.Component.Azure.AuthoringTools", "Microsoft.VisualStudio.Component.Azure.Waverton.BuildTools", "Microsoft.VisualStudio.Component.Azure.Compute.Emulator", "Microsoft.VisualStudio.Component.Azure.Waverton", "Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices", "Microsoft.VisualStudio.Component.Azure.ServiceFabric.Tools", "Microsoft.VisualStudio.Component.Azure.Powershell", "Microsoft.VisualStudio.Workload.Azure", "Microsoft.VisualStudio.Workload.Data" ], "extensions": [ "https://marketplace.visualstudio.com/items?itemName=ProBITools.MicrosoftReportProjectsforVisualStudio2022&ssr" ] }
Sidenote: If you have Intune Suite licenses, Visual Studio 2022 Professional is prepackaged as a Microsoft managed Enterprise Catalog App. Microsoft Intune Enterprise Application Management | Microsoft Learn.