PDA

View Full Version : Using Powershell to manage builds



DLee65
10-18-2013, 01:47 PM
I am attempting to create a build script using PowerShell that I can integrate into CruiseControl.NET

I can open and close a project successfully however, I cannot do the following:


Access ISWiProductConfigs or ISWiReleases. I actually have to clarify, I am not correctly accessing the content of these items.

I have successfully retrieved $m_ISWiProj.ISWiProductConfigs.Count
Attempting to execute: $m_ISWiProj.ISWiProductConfigs("$projParams").ISWiReleases("$projParams") returns an error. The parameters are a valid configuration and release name.
An attempt to just retrieve the list of configurations failed to return anything.



I am sure this is possible. I prefer PowerShell because it is natively supported by CruiseControl.NET

I have seen Cory's blog: http://blogs.flexerasoftware.com/installtalk/2011/01/getting-started-with-installshield-automation-and-powershell.html
This was very helpful in getting started. But I am not certain why I am not getting information on the Configuration or Releases.

Any ideas?

Dan

Christopher Painter
10-19-2013, 09:40 PM
How's your C# programming?

Personally I'd create a reusable library using C# to wrap the COM calls. You could then consume that from a console EXE, an MSBuild task or a PowerShell static method invocation. See:

http://blog.iswix.com/2010/12/thoughts-on-using-c-in-build-automation.html

PS- I know CruiseControl.NET has good MSBuild support. That's the direction I'd go....