NikCharlebois / VisualStudioDSC

DSC Module to install Visual Studio 2013+
0 stars 1 forks source link

Resource does not install VS #1

Open bminisi opened 6 years ago

bminisi commented 6 years ago

The resource does detect that absence of VS, but does not start the installation process. It only does the consistency check.

LCM: [ Start Resource ] [[VSInstall]installVS] "}, LCM: [ Start Test ] [[VSInstall]installVS] "}, [[VSInstall]installVS] Checking to see if Visual Studio 2017 is installed"}, LCM: [ End Test ] [[VSInstall]installVS] False in 0.1880 seconds."}, LCM: [ End Resource ] [[VSInstall]installVS] "}, [] Consistency check completed."}

The configuration is as follows (the executable path is "C:\Install\VS\vs_enterprise.exe"):

    VSInstall installVS
    {
        ExecutablePath = $VSInstallPath
        InstallAccount = $Cred
        Workloads = 'Microsoft.VisualStudio.Workload.Azure,Microsoft.VisualStudio.Workload.ManagedDesktop,Microsoft.VisualStudio.Workload.NetWeb,Microsoft.VisualStudio.Workload.Office'
        Ensure = 'Present'
    }
Ankita-Chaudhari commented 4 years ago

When I try to run the config file into Azure Automation DSC, it fails to compile with the following error: Exception calling "NewScriptBlock" with "1" argument(s): "At line:6 char:5 + Import-DscResource -ModuleName 'VSInstall' + ~~~~~~~~~~ Could not find the module 'VSInstall'. At line:25 char:9 + VSInstall installVS + ~~~ Undefined DSC resource 'VSInstall'. Use Import-DSCResource to import the resource." (At line:6 char:5 + Import-DscResource -ModuleName 'VSInstall' + ~~~~~~~~~~ Could not find the module 'VSInstall'. At line:25 char:9 + VSInstall installVS + ~~~ Undefined DSC resource 'VSInstall'. Use Import-DSCResource to import the resource.)

This is the configuration file I am using : VSInstall installVS { ExecutablePath = $VSInstallPath InstallAccount = $Cred Workloads = 'Microsoft.VisualStudio.Workload.Azure,Microsoft.VisualStudio.Workload.ManagedDesktop,Microsoft.VisualStudio.Workload.NetWeb,Microsoft.VisualStudio.Workload.Office' Ensure = 'Present' }