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 (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,

msbuild cannot build visual studio setup projects – for real!