none
Build msi packages by msbuild

    Question

  • Hi,

    I could learn that vdproj files cannot be build by msbuild. Is there a way that I can build .msi packages by msbuild? or any command to build vdproj files? (other than
    devenv.com )

    Sandun
    Monday, September 22, 2008 4:59 AM

Answers

  •  

    Hi Sandun,

    I don’t think that the referred projects will be build multiple times.  When the .vdproj is being built, it will force the referred project to be built, however, the build process will check if the output of the referred project is up-to-date, if it is up-to-date, the build process will skip quickly. If you want build all the .vdproj in your solution, I suggest you build the whole solution with devenv.

    However, the recommended way is to convert from .vdproj to WiX format. WiX is fully buildable by MSBuild without VS installed. And it is more powerful than .vdproj. For more information about Wix, please check the following page:

    ·         http://wix.sourceforge.net/manual-wix2/wix_index.htm

    Best regards.
    Rong-Chun Zhang

    Windows Forms General FAQs
    Windows Forms Data Controls and Databinding FAQs

    Friday, September 26, 2008 12:43 PM

All replies

  • I have multiple vdproj projects in my solution. I could build them one by one, using the following target.

    <Target Name="BuildInstallers">
        <Exec Command='"devenv.com" Installer1.vdproj /build "$(BuildType)"'/>
        <Exec Command='"devenv.com" Installer2.vdproj /build "$(BuildType)"'/>
        <Exec Command='"devenv.com" Installer3.vdproj /build "$(BuildType)"'/>
      </Target>

    I know this is not a good way of doing it, since it makes the same project gets built multiple times. So, Is there a better way?
    Wednesday, September 24, 2008 8:12 AM
  •  

    Hi Sandun,

    Setup projects (.vdproj) do not have a project system format that can be understood by MSBuild. Hence MSBuild cannot build these projects directl. However, we can use the devenv /build command to build the vdproj files and generate MSI installers. I don’t think that your BuildInstallers target will build the vdproj project multi times. Did you mean the referred project will be build many times?

    For more information, please check:
    http://blogs.msdn.com/anutthara/archive/2006/01/05/509606.aspx

    Thanks,
    Rong-Chun Zhang

    Wednesday, September 24, 2008 11:34 AM
  • What I ended up doing was creating a .cmd file that runs msbuild. The msbuild creates all of my click once files.

    The .cmd file gets run in the prebuild event of the setup project. Then, a vbs script runs which zips all of my click once files into a zip file. When solution builds it grabs this zip file and puts it into the msi. When the msi installs another vbs expands the zip files and puts my click once files on the server.


    Wednesday, September 24, 2008 7:19 PM
  • Yes, The referred projects will be build multiple times.
    Thursday, September 25, 2008 3:45 AM
  •  

    Hi Sandun,

    I don’t think that the referred projects will be build multiple times.  When the .vdproj is being built, it will force the referred project to be built, however, the build process will check if the output of the referred project is up-to-date, if it is up-to-date, the build process will skip quickly. If you want build all the .vdproj in your solution, I suggest you build the whole solution with devenv.

    However, the recommended way is to convert from .vdproj to WiX format. WiX is fully buildable by MSBuild without VS installed. And it is more powerful than .vdproj. For more information about Wix, please check the following page:

    ·         http://wix.sourceforge.net/manual-wix2/wix_index.htm

    Best regards.
    Rong-Chun Zhang

    Windows Forms General FAQs
    Windows Forms Data Controls and Databinding FAQs

    Friday, September 26, 2008 12:43 PM