views:

1750

answers:

6

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?

A: 

(You did not say what Kind of Build Server you have. Because you tagged ".net" I am going to assume you are using TFS and Team Build.)

Team Build uses MSBuild (really it IS MSBuild). MSBuild cannot build vdproj files. Only Visual Studio can do that.

So if you are including solutions that that include vdproj files then they will fail. (Check your build log around the vdproj projects to see if they failed.)

One way to stop these failures from registering is to create a configuration that you compile for your Team Build that does not include your vdproj files (if the failed projects are really bugging you).

The best way to get your msi and exe files are to run Visual Studio on your vdproj projects. Add a custom target after the build has finished and call Visual Studio manually on your project. (I don't know why your msi and exe files are being generated unless you are doing this.)

As an alternative consider Windows Installer XML (WIX). Version 3 (which is very very close to full release and has a stable beta out) uses MSBuild. This means that your solutions can be compiled via Team Build with out any special actions. The only drawback is that WIX cannot target 'Any CPU', but it can be part of a Solution Level target of 'Any CPU' as long as it is targeting a specific platform.

Vaccano
The build server itself is FinalBuilder, though that's moot here because the problem happened building in VS on the build server machine.
Neil Barnwell
A: 

yeah, I've had this before.

Not sure about your set up, but try this is appropriate:

Firstly, right-click on your Solution file > Properties > Configuration

In there, use the build tick boxes to experiment with which projects build together, and which don't.

Also, in your file system, delete the debug/release folders for all of your projects.

Finally, in my experience, this error is usually caused by a corrupt/missing web.config.

let me know how you go

andy
+6  A: 

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.

Neil Barnwell
Another workaround listed on this Microsoft bug page worked for me: right click on the solution and click "Clean Solution" in Visual Studio.
Max Masnick
Richard
A: 

If the other solutions posted here don't work then check to see if you have the Visual Studio SDK installed. If you do you probably need to uninstall the SDK and it might fix your problem.

This is a known issue that is documented here: http://connect.microsoft.com/VisualStudio/feedback/Validation.aspx?FeedbackID=345523

Once I uninstalled the SDK the build started working.

A: 

Are you referring to the Windows SDK by chance?

Alex
A: 

hello Neil Barnwell , the first solution is worked to me thanks alot

ahmad