msbuild cannot build visual studio setup projects – for real!

Screen Shot 2015-07-16 at 9.49.05 PMI had a funny experience today with msbuild and Visual Studio project type: setup package (vdproj).

In attempt to introduce a new solution to cruisecontrol.net (my clients choice, not mine) we encountered a situation when the build was green but no output media!

After digging more, I saw that the solution was building fine except the last project – the main setup project that we were expecting as result media. Checking the logs showed that all project build fine, but when msbuild hits the *.vdproj reports warning:

todo: add the warning here

In my book, this should have been an error… The problem was that I did not believe it! We had at least two other projects like this one, and they were building fine for a long time. Ignoring the common sense and the meaning of the warning I’ve started rather long googling exercise about this situation. All articles were pointing that we should use devenv.exe for vdproj type, but I still did not want to believe. How the hack my other two projects were good to go, but not this one?!?

Finally my rational side kicked off and my hunger to understand the big “Why?” kicked off, and I went to the basics.

Let see how the successful projects are build – and I was so sure that we are using msbuild for everything…

Checking the log revealed right away that the usual command line with msbuil.exe is missing…

You gotta love the job as a developer and in some cases as DevOps – it keeps you real and focused every day. It challenges your assumptions.

My favorite quote was proven true for a millionth time: “The computer will not do what you want, but what you are telling it to do!”

Checking more details for those particular successful project showed me that they are treated as special type of build, and our scripts were using the devenv.exe

I understand that it will be painful for you to build .vdproj type if your build server does not have installed Visual Studio – aka devenv is missing…

Note to myself: in case we move to ThoughtsWorks GO and we start using multiple agents on different servers that do not have devenv – what should be the best option for building?…
Please comment bellow if you have experience with this.

Thanks in advance,
Nik

msbuild cannot build visual studio setup projects – for real!

One thought on “msbuild cannot build visual studio setup projects – for real!

  1. kiqueneet says:

    MSBuild cannot build .vdproj projects. You should use Visual Studio (devenv.com) for this.

    http://techproblemssolved.blogspot.fr/2009/05/msbuild-and-vdproj-files.html
    http://donovanbrown.com/post/I-need-to-build-a-project-that-is-not-supported-by-MSBuild

    You can not build setup installer project file .vdproj file using MSBuild.
    The workaround is to use Visual Studio (devenv.exe) to build the solution file.
    For example: devenv.exe MySolution.sln /build -switch

    You can also execute in MSBuild script using “Exec” task.
    For example:

    Like

Leave a Reply to kiqueneet Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s