开发者

Compile Setup project with devenv.com - "ERROR: Unable to update the dependencies of the project"

开发者 https://www.devze.com 2023-04-10 05:39 出处:网络
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:

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 do开发者_高级运维es not promise me that the problem will not re-occur in the future.

Thanks very much!


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.

  1. Remove the Installer project from your solution through the IDE interface
  2. Add the Installer project back into your solution (Add > Existing Project...)
  3. Rebuild

It works practically every time for me...


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.


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


This worked for me:

  1. Run a clean solution command from VS2010
  2. Open source code folder in explorer
  3. Search for *.exe files, sort by location
  4. 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.


This is copied from @timB33's external link, which works. All links to the MS hotfix appear to broken, so this was the only way I could find to fix without removing and recreating the setup project.

I have consistently used this method to get around this bug instead of rebuilding my setup projects. This applies to both merge module projects AND setup projects. Manually remove the data in the Hierarchy and Files section of the project files.

  1. Open .VDPROJ file

  2. Find the "Hierarchy" section. Delete everything so the section looks like this: "Hierarchy" { }

  3. Find the "File" section. Delete everything so the section looks like this: "File" { }

  4. Reload the project

  5. Rebuild the project.

  6. You may need to re-add project outputs if missing something


support.microsoft.com/kb/2286556

thanks Hans, this update fixed my problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消