Pregunta

I'm trying to use MSBuild to create a target that will create an installer with InstallShield 2012. I'm having difficultly understanding how to access InstallShield. I ran across this mentioning an InstallShield task but I'm not sure how to get access to it. I think I need a UsingTask directive, but not sure what to import. Can someone give me a pointer on how to get this going? Thanks.

¿Fue útil?

Solución

You need to import the targets file. Took me a while to figure that out as well since it's in the msbuild extensions directory together with a dll. Here's a basic sample of how to use it (note this is for 2012Spring but you get the idea):

<Import Project="$(MSBuildExtensionsPath32)\InstallShield\2012Spring\InstallShield.targets" />

<Target Name="BuildInstaller">
  <InstallShield.Tasks.InstallShield
    Project="/path/to/my.ism"
    ProductConfiguration="Package"
    ReleaseConfiguration="MSI" />
</Target>

Btw if this doesn't work out for some reason, you can always invoke ISCmdBld.exe in an Exec task, it will do the job just as fine.

Otros consejos

InstallShield provides Visual Studio integration. When you create an InstallShield project in VS it creates a project file (.ISPROJ) which imports the InstallShield.targets file for that version of InstallShield. The project file contains plenty of examples on how to build a particular configuration and pass in such things as merge module path, properties, path variable overrides and so on.

Please note that building InstallShield requires the x86 MSBuild platform due to COM components.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top