DCSIMG
Building Setup Project In devenv.com Command Line Fails, Works In IDE - Shai Raiten's Blog

Shai Raiten's Blog

It's all about code...

Building Setup Project In devenv.com Command Line Fails, Works In IDE

Building Setup Project In devenv.com Command Line Fails, Works In IDE

I started to build a Build Definition in TFS 2010 (WF) for one of my customers and ran into a strange problem with couple of Setup Projects, when I build the Setup Project in Visual Studio 2010 IDE the setup built just fine but once I tried to build it using devenv command it fails.. (To build setup project using Team Build you need to invoke devenv with command line arguments.)

The Error from the command line is:

ERROR: Unable to update the dependencies of the project.  The dependencies for the object ‘DLL NAME’ cannot be determined.

This was very strange, so I did a comprehensive investigation why this happens and I found the problem!

For some reason when adding a File to the setup project that need Dependencies, Visual Studio automatically add them into the Dependencies folder in the Setup project and for some reason this dependency cannot be found from Command Line.

Here is a Simple Setup Project in Visual Studio

image

Through Command Line - Working

image

The same Setup Project + I’ve added an Assembly “API.DLL” and Visual Studio automatically added the necessary Dll’s.

This setup project build just fine in Visual Studio.

image

Through Command Line – Not Working!

image

The Solution: You need to add the missing Assembly in the same folder where the .vdproj file is.

Before I’m using WorkFlow to build those Setup Projects I built a special Activity that find the needed Dependencies of each setup project copy them into the folder and the Build the Setup project.

image

Than Through Command Line – Working Again!!!

image

Hope this helps.

Comments

Philip said:

Hi Shai,

Can you give more details on how you did this part please:

"Before I’m using WorkFlow to build those Setup Projects I built a special Activity that find the needed Dependencies of each setup project copy them into the folder and the Build the Setup project."

# December 8, 2010 5:14 PM

shair said:

Hi,

I'll write later on how to create custom activities for WF in Build 2010.

# December 10, 2010 11:43 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: