'Rebuild All Failed' - Web Reference

Hi,

I've upgraded a Pocket PC 2003 C# application from VS 2003 (CF1.1) to VS 2005 (CF2.0).

When I build the application I get a message on the status bar 'Rebuild All Failed'. No errors or warnings are given. If I remove the web reference it builds OK. When I put the web reference back it doesn't.

Can someone help me out please?

Best Regards,

Craig Harrison

[373 byte] By [CraigHarrison] at [2008-2-2]
# 1
Could you send me your project so I can take a loot?
Thanks,
David
DavidTSo at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices VB and C# Projects...
# 2
Hi Craig,

There is a behind-the-scenes build step which generates serialization assemblies. In VS 2005 Beta 2, there are some Smart Device scenarios (like adding a certain Web Reference to a project and switching to the Release build configuration) which cause the Serialization Assembly generation build task to execute and cause a build failure.

For VS 2005 Beta 2, the option to generate Serialization Assemblies is defaulted to "Auto". For the release version of VS 2005, we have completely disabled the ability to generate Serialization Assemblies for device projects. The .NET Compact Framework does not support serialization assemblies which is the cause for the failures in the first place.

To work around this problem in VS 2005 Beta 2, perform the following steps:

  1. Open the Project menu and select the “<project name> Properties” menu item. This will bring up the project property pages.
  2. For C#, select “Build” tab and scroll to the bottom of the pane. For VB, select the "Compile" tab and click the Advanced Compile Options... button.
  3. Change the Generate serialization assembly property to “Off”.
  4. Rebuild

You should be all fixed up.

To the rest of the Smart Devices development community:

Depending on the settings that you have chosen (particularly the Visual Basic Development Settings option) and what language (VB or C#) your project is, VS 2005 will hide certain build steps. Serialization Assembly generation, for example, is one of these build steps that may not show up in the Output Window or put errors in the Error List.

If your project fails to build and you are not given any information why, you can boost how much information the Output window shows by performing the following steps:

  1. Go to Tools menu and select Options
  2. In the tree view in the Options dialog, navigate to the Projects and Solutions->Build and Run node
  3. Change the property “MSBuild project build output verbosity” from “Minimal” to “Diagnostic”
  4. Build the project
  5. After the build, if the Output window is not visible, make it visible by going to the Debug menu and selecting the Windows->Output menu item
  6. In the Output window, there is a combo box labeled “Show output from:”. If “Build” isn’t already the selected option, then select it
  7. You should now see quite a bit of data in the output window.
  8. You can search the output window for "fail" or whatever text meets your fancy (for the failure discussed above, its under the "sgen.exe" task)

After you track down the problem, you'll probably want to switch the verbosity back to “Minimal”. The “Diagnostic” setting actually hurts performance and makes it a little more difficult to track down your normal day-to-day build errors and warnings.

I hope that helps,
Keith
Tester - VS Devices

KeithJones at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices VB and C# Projects...
# 3
Keith Jones wrote:
Change the property “MSBuild project build output verbosity” from “Minimal” to “Diagnostic”

this options does not seem to be available in vsto 2005 beta2 apparently. are you sure that is where it is?

farseer at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices VB and C# Projects...
# 4

The location I gave is correct for the VSTS sku of VS 2005. I do not know about the VSTO sku but if changing the verbosity is supported, then the location should be the same. Perhaps the environment settings you are using are hiding that option. Is there a check box in the lower left-hand corner of the Options dialog which says "Show all settings"? If so, try clicking that check box and looking again.

Keith

KeithJones at 2007-9-8 > top of Msdn Tech,Smart Device Development,Smart Devices VB and C# Projects...