Cannot compile using .NET Compact Framework

Hey guys,

I cannot compile some sample code using the .NET Compact Framework because there are a couple of classes DirectFlight.cs calls that don’t seem to exist in that Framework. They are:

System.ComponentModel.AsyncCompletedEventArgs
System.Threading.SendOrPostCallback

I am trying to develop and app for Windows Mobile 5.0, and therefore need to stick with the .NET Compact Framework 2.0. Do you know of any solutions to this problem?

Thanks,

Hi, miguez. Have you tried googling for the problem? There are a lot of references to that class. FlightAware’s WSDL doesn’t have any references to either function (AsyncCompletedEventArgs or SendOrPostCallback), so I’m not sure where that’s coming from. Other .NET developers may be able to shed some light on this.

Hey Daniel,

Nice to be back.

I have not tried to Google it yet, was checking with you guys first.

If I find a way around it, I’ll let everyone here know.

You guys never developed for Windows Mobile yet?

Best regards,

OK, got it to work.

The problem was even though those classes are not part of your webservice, as you indicated, they are always created by WSDL.

You either have to go in and delete each one of them from the newly-created DirectFlight.cs or, the much better option:

  • right click on the References folder of your project, inside the Solution Explorer in VisualStudio 2005
  • Select “Add Web Reference…”
  • in the URL text box, paste flightaware.com/commercial/direc … /wsdl1.xml
  • hit the “Add Reference” button on the bottom right

It’s as simple as that. Much easier than creating the .cs file myself, let VS2005 deal with all that.

Best regards,