I want to generate MSI files from a .vdproj
file using the devenv
command in a command prompt. This command is running well but no MSI file is generated. What is wrong?
What should I set in environment variables, or is there any other way to generate an MSI from a .vdproj
file?
This is usually (in my experience!) caused by not targeting the correct build configuration. Within Visual Studio, at the solution level you can go to the
Build
menu and chooseConfiguration Manager
. Ensure that for all applicable configurations (chosen via theActive Solution Configuration
drop-down) the installer project has a tick in theBuild
column.Now you need to ensure that when invoking devenv you're passing the appropriate build configuration (i.e. one that has
Build
ticked for the setup project) as follows:(In this example,
Release
is the build configuration I'm targeting)This command also logs the output of Visual Studio to a text file called
vs_errors.txt
in the same folder as your solution so you can review this to determine if there are any other reasons why the setup project failed to build.Above script worked for me, try it and let me know if it works for you. You can pretty much have any configuration. I have used
Release|x86
. Just replace that line with your configuration and it should work. Make sure that whatever configuration you use exists in.sln
file or.csproj
file, otherwise you may get some error about invalid configuration. Hope this helps.My case was the same, and giving the project name with /project helped with .msi file generation,
I don't think that msi will be genereated from devenv.com , you may choose wix with nant to create installer.
Nant has a task, msi task but it requires micrsoft cabinet sdk, which is not available for download.
read this for more details Build merge module without Devenv from .vdproj
p.s. If you find another way to build the installer , please share.