Running devenv in .vdproj on the command line does not create MSI

I want to generate .msi files from a .vdproj file using the devenv command on the command line. This command works well, but the MSI file is not created. What's wrong?

What do I need to set in environment variables or is there another way to create MSI from a .vdproj file?

+5
source share
4 answers

This is usually (in my experience!) Caused by incorrect configuration settings. In Visual Studio, at the solution level, you can go to the Build menu and select Configuration Manager . Make sure that for all applicable configurations (selected using the Active Solution Configuration drop-down list), the installer project has a checkmark in the Build column.

Now you need to make sure that when you call devenv, you pass the appropriate assembly configuration (i.e. the one that has the Build marked for the installation project) as follows:

 C:\PathToVisualStudio\devenv.exe /Rebuild Release C:\PathToProject\ProjectName.sln" /Out "PathToProject\vs_errors.txt" 

(In this example, Release is the build configuration I'm aiming for)

This command also logs Visual Studio output into a text file named vs_errors.txt in the same folder as your solution, so you can look at this to determine if there are other reasons why the installation project could not be created.

+5
source

The above script worked for me, try it and let me know if it works for you. You can pretty much have any configuration. I used Release|x86 . Just replace this line with your configuration and it should work. Make sure that the configuration you are using exists in the .sln or .csproj , otherwise you may receive an error message about an invalid configuration. Hope this helps.

 <target name="BuildMsi"> <echo message="Creating installables (.msi) for MyTestApplication, please wait..."/> <exec program="c:\program files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe"> <arg value="c:\My app\My_Test_solution.sln"/> <arg value="/build"/> <arg value="Release|x86" /> <arg value="/project"/> <arg value="c:\My app\setup\My_Test_solution.vdproj"/> </exec> </target> 
+3
source

In my case, it was the same thing, and assigning the name of the project / project helped to generate the .msi file,

 devenv /build Release /project SDK-Deployment SDK-Deployment.vdproj 
+1
source

I do not think that msi will be genereated with devenv.com, you can choose wix with nant to create the installer.

Nant has a task, a msi task, but it requires an sdk micrsoft cabinet, which is not available for download.

read this for more details Compile the merge module without Devenv from .vdproj

ps If you find another way to create an installer, share it.

0
source

Source: https://habr.com/ru/post/1310455/


All Articles