The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,481 other followers

VS2017 Community .vsconfig file – Visual Studio Community workload and component IDs | Microsoft Docs

Posted by jpluimers on 2021/03/10

When I need to find out what components match my below installed .vsconfig component IDs for Visual Studio 2017 community edition, I can find them in: [WayBack] Visual Studio Community workload and component IDs | Microsoft Docs: Use workload and component IDs to install Visual Studio by using the command line or to specify as a dependency in a VSIX manifest.

{
    "version": "1.0",
    "components": [
        "Microsoft.VisualStudio.Workload.ManagedDesktop",
        "Microsoft.VisualStudio.Workload.NativeDesktop",
        "Microsoft.VisualStudio.Workload.Universal",
        "Microsoft.VisualStudio.Workload.NetWeb",
        "Microsoft.VisualStudio.Workload.Azure",
        "Microsoft.VisualStudio.Workload.Python",
        "Microsoft.VisualStudio.Workload.Node",
        "Microsoft.VisualStudio.Workload.Office",
        "Microsoft.VisualStudio.Workload.NetCrossPlat",
        "Microsoft.VisualStudio.Workload.VisualStudioExtension",
        "Microsoft.VisualStudio.Workload.NativeCrossPlat",
        "Microsoft.VisualStudio.Workload.NetCoreTools",
        "microsoft.net.componentgroup.targetingpacks.common",
        "microsoft.visualstudio.component.entityframework",
        "microsoft.visualstudio.component.debugger.justintime",
        "microsoft.visualstudio.component.vc.diagnostictools",
        "microsoft.visualstudio.component.vc.cmake.project",
        "microsoft.visualstudio.component.vc.atl",
        "microsoft.visualstudio.component.vc.testadapterforboosttest",
        "microsoft.visualstudio.component.vc.testadapterforgoogletest",
        "microsoft.visualstudio.componentgroup.web.cloudtools",
        "microsoft.visualstudio.component.aspnet45",
        "microsoft.component.azure.datalake.tools",
        "microsoft.visualstudio.componentgroup.azure.resourcemanager.tools",
        "microsoft.visualstudio.componentgroup.azure.cloudservices",
        "microsoft.visualstudio.component.azure.mobileappssdk",
        "microsoft.visualstudio.component.azure.servicefabric.tools",
        "microsoft.component.cookiecuttertools",
        "microsoft.component.pythontools.web",
        "component.cpython3.x64",
        "microsoft.visualstudio.component.teamoffice",
        "component.google.android.emulator.api27",
        "component.linux.cmake"
    ]
}

This comes in very useful when installing Visual Studio 2017 through chocolatey:

chocolatey install -yes visualstudio2017community
:: "Microsoft.VisualStudio.Workload.ManagedDesktop", 
chocolatey install -yes visualstudio2017-workload-manageddesktop
:: "Microsoft.VisualStudio.Workload.NativeDesktop", 
chocolatey install -yes visualstudio2017-workload-nativedesktop
:: "Microsoft.VisualStudio.Workload.Universal", 
chocolatey install -yes visualstudio2017-workload-universal
:: "Microsoft.VisualStudio.Workload.NetWeb", 
chocolatey install -yes visualstudio2017-workload-netweb
:: "Microsoft.VisualStudio.Workload.Azure", 
chocolatey install -yes visualstudio2017-workload-azure
:: "Microsoft.VisualStudio.Workload.Python", 
chocolatey install -yes visualstudio2017-workload-python
:: "Microsoft.VisualStudio.Workload.Node", 
chocolatey install -yes visualstudio2017-workload-node
:: "Microsoft.VisualStudio.Workload.Office", 
chocolatey install -yes visualstudio2017-workload-office
:: "Microsoft.VisualStudio.Workload.NetCrossPlat", 
chocolatey install -yes visualstudio2017-workload-netcrossplat
:: "Microsoft.VisualStudio.Workload.VisualStudioExtension", 
chocolatey install -yes visualstudio2017-workload-visualstudioextension
:: "Microsoft.VisualStudio.Workload.NativeCrossPlat", 
chocolatey install -yes visualstudio2017-workload-nativecrossplat
:: "Microsoft.VisualStudio.Workload.NetCoreTools", 
chocolatey install -yes visualstudio2017-workload-netcoretools

Visual Studio 2017 related Packages I still need to research from [WayBack] GitHub – jberezanski/ChocolateyPackages: Chocolatey packages maintained by me:

–jeroen

References:

https://github.com/jberezanski/ChocolateyPackages/issues/25

## USAGE EXAMPLES
# installs CoreEditor (the IDE), ManagedDesktop (.NET framework applications), NetCoreTools (.NET core applications), NetWeb (ASP.NET) + active product using provided Product Key
# choco install visualstudio2017enterprise.pls -y –params "/Features:Microsoft.VisualStudio.Workload.CoreEditor,Microsoft.VisualStudio.Workload.ManagedDesktop,Microsoft.VisualStudio.Workload.NetCoreTools,Microsoft.VisualStudio.Workload.NetWeb /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
# silent bare minimum installation with product key activation. The minimum installation contains only the Core Editor workload (Microsoft.VisualStudio.Workload.CoreEditor)
# choco install visualstudio2017enterprise.pls -y –params "/ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
# silent bare minimum installation without product key activation
# choco install visualstudio2017enterprise.pls -y
# Parse input argument string into a hashtable
# Format: /InstallPath:path location /Features:Microsoft.VisualStudio.Workload.CoreEditor,Microsoft.VisualStudio.Workload.ManagedDesktop /ProductKey:AB-D1
function Parse-Parameters ($s)
{
$parameters = @{ }
if (!$s)
{
Write-Debug "No package parameters."
return $parameters
}
Write-Debug "Package parameters: $s"
$s = ' ' + $s
[String[]] $kvpPrefix = @(" /")
$kvpDelimiter = ':'
$kvps = $s.Split($kvpPrefix, [System.StringSplitOptions]::RemoveEmptyEntries)
foreach ($kvp in $kvps)
{
Write-Debug "Package parameter kvp: $kvp"
$delimiterIndex = $kvp.IndexOf($kvpDelimiter)
if (($delimiterIndex -le 0) -or ($delimiterIndex -ge ($kvp.Length 1))) { continue }
$key = $kvp.Substring(0, $delimiterIndex).Trim().ToLower()
if ($key -eq '') { continue }
$value = $kvp.Substring($delimiterIndex + 1).Trim()
Write-Debug "Package parameter: key=$key, value=$value"
$parameters.Add($key, $value)
}
return $parameters
}
function Generate-Install-Arguments-String ($parameters)
{
$s = "–includeRecommended –quiet –norestart –wait"
$s += " –addProductLang en-US –add Microsoft.VisualStudio.Workload.CoreEditor"
# –add Microsoft.VisualStudio.Workload.ManagedDesktop –add Microsoft.VisualStudio.Workload.NetCoreTools –add Microsoft.VisualStudio.Workload.NetWeb
$features = $parameters['Features']
if ($features)
{
foreach ($f in $features.Split(','))
{
$s += " –add "
$s += $f.Trim()
}
}
$rpp = '& "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\StorePID.exe"'
$ip = $parameters['InstallPath']
if ($ip)
{
$s += " –installPath `"$ip`""
$rpp = "& `"$($ip.Trim('\'))" + "\Common7\IDE\StorePID.exe`""
}
$pk = $parameters['ProductKey']
if ($pk)
{
$s += " –productKey $pk"
$parameters.Add('RegisterProduct', "$rpp $pk 08860")
}
return $s
}
$vendor = "microsoft"
$product = "visualstudio"
$packageName = $env:chocolateyPackageName
$packageParameters = ParseParameters $env:chocolateyPackageParameters
$silentArgs = GenerateInstall-ArgumentsString $packageParameters
$uncPath = "\\SERVER\tools\microsoft\visualstudio\2017\mu_visual_studio_enterprise_2017_x86_x64_10049783"
$uncUser = "DOMAIN\user"
$uncPassword = "password"
$driveLetter = dir function:[dz]: n | ?{ !(test-path $_) } | random
NET USE $driveLetter /D 2>null
NET USE $driveLetter $uncPath /u:$uncUser $uncPassword
$packageArgs = @{
packageName = $packageName
fileType = 'exe'
file = "$driveLetter\mu_visual_studio_enterprise_2017_x86_x64_10049783.exe"
silentArgs = $silentArgs
validExitCodes= @(0, 3010)
}
Write-Debug "Arguments used for $packageName`: $silentArgs"
Install-ChocolateyInstallPackage @packageArgs
NET USE $driveLetter /D 2>null
$rp = $packageParameters['RegisterProduct']
if ($rp)
{
Write-Debug "Register product using command line ($rp)"
Invoke-Expression $rp
}

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: