Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I prevent a .vdproj compile from updating the PackageCode on every compile?

I have a Visual Studio 2010 solution for a Web Application that contains all of the projects that make up the Web Application, plus the .vdproj file that builds the installer. All of the files are under configuration management.

Whenever I compile this solution with no changes in any source code, Visual Studio will check out the .vdproj file and make changes. At a minimum, the PackageCode will be changed to a to a different GUID. At other times it will change the order of the Hierarchy within the "DeployProject" section of the .vdproj file in addition to updating the PackageCode.

This does not happen with any of our other .vdproj files. One thing that makes this .vdproj unique is that in addition to containing the primary output from the other projects in the solution, it contains over 50 additional .iso, .kml, .jpg files that do not originate from a visual studio project. Could these be causing the PackageCode to change in some way?

like image 395
kcrossBAE Avatar asked Nov 06 '22 01:11

kcrossBAE


2 Answers

The package code should be changed each time you "release" an msi, see http://msdn.microsoft.com/en-us/library/Aa370568. Since VS doesn't know whether you will distribute this msi or not, it plays safe and modifies the package code.

Visual Studio should be able to handle this in combination with source control, and you're lucky it does that for you (in a way, apparently). Visual Studio 2010 SP1 has a problem there, see http://connect.microsoft.com/VisualStudio/feedback/details/650587/vs-2010-sp1-changes-packagecode-in-vdproj-on-each-build-but-fails-as-source-controlled

like image 179
Kris Vandermotten Avatar answered Nov 09 '22 09:11

Kris Vandermotten


This is the first useful google hit when searching for the infinite dialog message after installing VS2010 SP1 and building a solution with setup projects (.vbproj). This has been fixed by MS. I'm posting a more direct link to the hotfix download.

A hotfix for SP1 has been made available.

http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=35848

Read the hotfix link, as you still have to modify the project properties so the default build action doesn't try to change the product code on every build (see the project property added by the hotfix: BackwardCompatibleIDGeneration).

like image 23
yzorg Avatar answered Nov 09 '22 08:11

yzorg