简体   繁体   中英

Deploy VS19 over PowerShell DSC and choco

My goal is to deploy TeamCity agents configuration in Azure with DSC extensions. I'm able to deploy all required apps and services but I can't find how to deploy Visual Studio 19 with its optional parameters. VS19 itself installed, except parameters with Workload ID's, SDK's, etc. which I'm sending in the DSC build.

I'm using member Params for sending optional parameters. Perhaps I'm doing something wrong, can somebody, please take a look and help me with this issue? Thanks!

cChocoPackageInstaller vs19
{
    Name      = "visualstudio2019enterprise"
    Ensure    = "Present"
    Params    = "--add Microsoft.VisualStudio.Workload.Azure;includeRecommended `
                 --add Microsoft.NetCore.Component.DevelopmentTools;includeRecommended `
                 --add Microsoft.VisualStudio.Workload.Data;includeRecommended `
                 --add Microsoft.VisualStudio.Workload.NetCoreTools;includeRecommended `
                 --add Microsoft.VisualStudio.Workload.ManagedDesktop;includeRecommended `
                 --add Microsoft.Net.Component.4.6.1.SDK `
                 --add Microsoft.Net.Component.4.6.2.SDK `
                 --add Microsoft.Net.Component.4.7.1.SDK `
                 --add Microsoft.Net.Component.4.7.2.SDK `
                 --add Microsoft.Net.Component.4.7.2.SDK `
                 --add Microsoft.Net.Component.4.7.SDK `
                 --add Microsoft.Net.Core.Component.SDK.2.2"
    DependsOn = "[cChocoInstaller]installChoco"
}

The Params parameter is for package parameters . The visualstudio2019enterprise lists the package parameters that can be used on the package page (and links to more of them here ).

I think what you are looking for are installer parameters (ie. --install-arguments ) that can be passed to the installer (if its supported by the installer). If this is the case you could try using chocoParams = "--install-arguments='<your stuff>'" and see if that works (disclaimer - I haven't tested it).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM