简体   繁体   中英

How to build visual studio installer project (.vdproj) from jenkins to generate .exe and .msi files?

I have a visual studio installer project (.vdproj) and I wanted to build it from jenkins. Could someone provide me the solution for this? I tried with msbuild which didn't workout for me. Then i tried the following in batch file.

devenv.exe pathToProject\projectName.vdproj /build "Release|Any CPU"

which didn't work.

Then I tried this

devenv.com  pathToProject\projectName.vdproj /build "Release|Any CPU"

In this case the project was built but .exe and .msi files were not created in the Release (nor Debug) folder.

How to build visual studio installer project (.vdproj) from jenkins to generate .exe and .msi files?

Please try following build command line:

devenv.com  pathToProject\projectName.vdproj /build "Release"

As we know we could not specify the platform for the Installer project, because:

The architecture is specified in the setup project's properties window which, confusingly enough, is not the same as the property pages, which is what you are showing there.

If you select the setup project in solution explorer and click F4 you sould see the properties window with AddRemoveProgramsIcon, Manufacturer and so on. Down that list is TargetPlatform where you specify x86 or x64.

Certification: Can't set 64 bit target for Setup Project in Visual Studio 2017

在此处输入图片说明

See Automating the build of MSI setup packages on Jenkins for some details.

Note: The project file .vdproj is not supported by MSBuild, that is the reason why you can not use MSBuild to build it.

Buiding the .vdproj file from jenkins requires a register "EnableOutOfProcBuild" to be added as DWORD with value as 0 in the below hives.

"HKEY_CURRENT_USER - > Software -> Microsoft->Visual Studio ->14.0_Config -> MSBuild"

and

"HKEY_USERS- > .Default - > Software -> Microsoft->Visual Studio ->14.0_Config -> MSBuild".

You can use the below command to build the project.

devenv.com  pathToProject\projectName.vdproj /build "Release" or "Release|Any CPU"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM