0

I have a visual studio setup project that I am using for on one of my project. I shows me lot of dependencies that I don't want included in my MSI, so I excluded them (from VS UI). But for some reason when I use the command line msbuild it VS2010 still looks for the excluded dependencies. Then I decided to open the vdproj file in the text editor and then manually delete all the dependencies. So now my local msbuild problem is solved but when I build using the TFS build it reinjects all the dependencies into the MSI.

Ex:

"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_EE52F4998F1347C63BF8AE8E07278827"
        {
        "AssemblyRegister" = "3:1"
        "AssemblyIsInGAC" = "11:FALSE"
        "AssemblyAsmDisplayName" = "8:myproject.Test, Version=3.3.0.0, Culture=neutral, processorArchitecture=MSIL"
            "ScatterAssemblies"
            {
                "_EE52F4998F1347C63BF8AE8E07278827"
                {
                "Name" = "8:Test.testmsi.DLL"
                "Attributes" = "3:512"
                }
            }
        "SourcePath" = "8:test.testmsi.SR.DLL"
        "TargetName" = "8:"
        "Tag" = "8:"
        "Folder" = "8:_289AAB175D4E4DA9B94AC6756E51F3F9"
        "Condition" = "8:"
        "Transitive" = "11:FALSE"
        "Vital" = "11:TRUE"
        "ReadOnly" = "11:FALSE"
        "Hidden" = "11:FALSE"
        "System" = "11:FALSE"
        "Permanent" = "11:FALSE"
        "SharedLegacy" = "11:FALSE"
        "PackageAs" = "3:1"
        "Register" = "3:1"
        "Exclude" = "11:TRUE"
        "IsDependency" = "11:TRUE"
        "IsolateTo" = "8:"
        }

So basically what I did was delete all these section of the file which has

 "Exclude" = "11:TRUE"
 "IsDependency" = "11:TRUE"

Is there any thing else I need to remove from the file so that TFS does not inject other stuff in the MSI?

Thanks

Fox
  • 9,384
  • 13
  • 42
  • 63

2 Answers2

2

Automatic dependency detection is your enemy.

You can minimize the impact by only working on the installer project on the build machine, checking in via the build machine, and only in the final release configuration. Then the exclusions 'hold'. At least they do for me.

See my whinge about this component here.

GilesDMiddleton
  • 2,279
  • 22
  • 31
  • do you have some updates about it? @GilesDMiddleton – rios0rios0 Nov 24 '21 at 18:42
  • @rios0rios0 I see they deleted the entire connect site, so my whinge has been lost to the world. I know they do update this extension, but my long term goal is to move to WiX, as they don't appear interested in solving this issue. – GilesDMiddleton Nov 26 '21 at 09:01
  • @rios0rios0 also see this [SO post](https://stackoverflow.com/questions/8044840/how-come-the-exclude-property-of-the-assemblies-under-detected-dependencies-in?rq=1) for an alternative. – GilesDMiddleton Nov 26 '21 at 13:26
0

This helped me resolve my problem:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/cccfa305-e8c2-4cd2-8503-78e9fc2028cb/setup-build-fails-unable-to-update-the-dependencies-of-the-project?forum=netfxbcl

dismantling the setup project (remove all assemblies), then save the setup project, then edit the setup project file and remove assemblies which remain. Then re-add everything back from within Visual Studio. Then, exclude Detected Dependencies. Had to manually update IDs for shortcuts to point to the executable. The setup kits can be built once again.

nkanani
  • 548
  • 1
  • 6
  • 7