Visual Studio Setup and Deployment build fails with no errors

Neil Barnwell picture Neil Barnwell · May 11, 2009 · Viewed 8.1k times · Source

I have a setup and deployment project that, on our build server, reports the following in the summary:

========== Rebuild All: 25 succeeded, 2 failed, 0 skipped ==========

I don't know what the two are that failed, though I believe one of them is the vdproj project because if I run the build without the installer there are no errors reported at all. The "packaging file" messages match the output on my PC, where the build completes successfully.

I'm convinced it's an environment thing, just that there are no logs anywhere that say what the problem was - just the number in the summary.

Even stranger is that the setup.exe and myapp.msi files appear to be generated fine. I can't work out what the projects are that failed, because there's no mention of a failed project. All I know is that if I build the solution excluding the setup project the summary says there were no errors.

Can anyone think of anything to check?

Answer

Neil Barnwell picture Neil Barnwell · May 15, 2009

The answer in the end was that it is a known bug: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=317870

The answer is to modify project files (*.csproj) containing LINQ to SQL dbml files to remove some stuff, as follows:

  1. Close VS 2008.
  2. Open the project file containing the LINQ To SQL item in Notepad.
  3. Remove the following lines:
    [ItemGroup]
    [Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}"/]
    [/ItemGroup]

The Setup Project will now build successfully. However, if you double-click the DBML file to open the designer in VS 2008 the Setup Project will stop building again. The above lines do not get re-added to the project file but the Setup Project will stop building anyway. Just restart VS 2008 and it will work again -- until you open the DBML designer again. Once the Setup Project fails due to this problem it will never build successfully until after you restart VS 2008.

I eventually found the answer (or at least the link to the answer) from the MS Connect forum topic. Here's the documented workaround.