Compile Setup project with devenv.com - "ERROR: Unable to update the dependencies of the project"
Solution 1
support.microsoft.com/kb/2286556
thanks Hans, this update fixed my problem.
Solution 2
I used to rebuild these installer projects from scratch when they stopped working (for whatever reason), but I've found a much much quicker (and less error-prone) workaround. It works for me. Maybe it will work for you.
- Remove the Installer project from your solution through the IDE interface
- Add the Installer project back into your solution (Add > Existing Project...)
- Rebuild
It works practically every time for me...
Solution 3
The hotfix didn't fix the issue on my computer (tried on two computers, rebooted all that jazz)
Instead I used source control to figure out what happened to my .vdproj.
It appears extra corrupt entries are added to the "File"
section of the .vdproj.
Suppose you are getting an error such as
ERROR: Unable to update the dependencies of the project. The dependencies for the object 'AutoMapper.DLL' cannot be determined.
In your .vdproj search for AutoMapper and you should come across several { } where it is used.
A normal one looks like this:
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_263299FB43D185D41A44FBEE0253D3ED"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:AutoMapper, Version=1.1.0.188, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_263299FB43D185D41A44FBEE0253D3ED"
{
"Name" = "8:AutoMapper.DLL"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:AutoMapper.DLL"
whereas a corrupt chunk is missing the name of the dll (AutoMapper.DLL in this case) in the ScatterAssemblies
section.
Remove this corrupt entry, that is the entire section starting from "{9F6F8455-..
down to the next chunk.
Solution 4
I fixed this by editing the vdproj by hand and removing the Hierachy and File sections and then rebuilding the vdproj
see: Setup project error: Unable to update the dependencies of the project
Solution 5
This worked for me:
- Run a clean solution command from VS2010
- Open source code folder in explorer
- Search for *.exe files, sort by location
- Manually delete all files in Release folder
If there exists some_project.vshost.exe locked up file, open properties of this project in VS, and uncheck "Enable the Visual Studio hosting process" under debug. Then remove it as well. It should build now.
Related videos on Youtube
Orad SA
Updated on July 09, 2022Comments
-
Orad SA almost 2 years
I have a Setup deployment project in VS 2010. The project compiles perfectly with the GUI interface of VS 2010, but any time I trying to compile it via vs cmd (devenv.com) it comes up with this error:
ERROR: Unable to update the dependencies of the project.
Notice that there is NO dll that mentioned in the error (e.g. the error does NOT contain "The dependencies for the object ‘xxx’ cannot be determined").
Please do not tell me to clean all the files in this setup and start from ground up - this is not a real solution! I have 5 projects with this exact error, and I don't want to re-arrange each one. More then that, this does not promise me that the problem will not re-occur in the future.
Thanks very much!
-
user1703401 over 12 years
-
g9ncom over 8 yearsThe link is broken to this hot fix
-
IgorStack about 7 yearsInstalling VS2010 Service Pack 1 fixed the problem.
-
-
PeterX over 10 yearsThanks @BrainCoder - I restarted then then got TFS errors when I tried to build the MSI. Once I checked-out the MSI project it started working. (I'm guessing you don't need the hotfix if you have SP1).
-
bic almost 10 yearsThis worked for me as well although afterwards I had to fix the shortcut targets for the desktop and program menu.
-
John Kroetch almost 10 yearsYes, sometimes I have to relink a couple of things, but it sure saved me tons of time & wasted debugging effort. :)
-
David almost 9 yearsTo delete my locked files, I closed VS, deleted, then restarted it. That makes me wonder, however, if simply restarting VS would have fixed it (it does fix weird errors sometimes...)
-
g9ncom over 8 yearsHotfix link is broken
-
g9ncom over 8 yearsI've copied the solution of the external link to this thread.
-
Alex over 8 yearsFor me, this was helpful but not enough. Then I had to open Detected Dependencies in Solution Explorer and then do Exclude for all the DLLs in the list. After that, it built successfully.
-
Sandeep over 8 yearsI didn't believe this approach first, however, "removing the erroring .vdproj and then adding the existing .vdproj project again" approach worked for me.
-
Reinstate Monica Cellio over 8 yearsIn the absence of the suggested hotlink, this worked for me. Closed VS, editor the vdproj file, reopened VS and the project built perfectly first time.
-
David Fawzy about 8 yearsJust had the same issue in Visual studio 2010 removing and adding the setup project worked perfect for me
-
AXMIM almost 8 yearsSame comment as Sandeep, didn't believe it would work until, boom that is all there was to it.
-
Neil Stoker about 7 yearsThis issue cropped up for me after resolving a marathon merge conflict, and I had two sections with empty ScatterAssemblies sections. The remove and re-add installer answer didn't fix the issue for me.
-
Matthew over 2 yearsThank you for this response! Only difference for me was, I had to remove the csproj that was causing the issue when building the vdproj. Of course, removing the csproj, the primary output was removed, so I had to make sure to re-add the primary output to the vdproj's file system editor.