I've had some problems adding a web service to an object model using DevForce EF 4.2.2.1. When the service is initially added, errors similar to this are reported about the edmx:
Error 40: The Type FetchRequest is not qualified with a namespace or alias. Only PrimitiveTypes can be used without qualification.
D:\VS Projects\DynamicsWebDevForce\DomainModel\CrmServiceReference.edmx
Ignoring the error and compiling the solution gives a series of errors like this:
The type or namespace name 'FetchRequest' could not be found (are you missing a using directive or an assembly reference?)
D:\VS Projects\DynamicsWebDevForce\DomainModel\DomainModel.CrmServiceReference.Designer.cs
Modifying the *.Designer.cs file by adding the proper namespace reference, then compiling the solution surfaces a series of errors like this:
The type 'DomainModel.CrmServiceReference.FetchRequest' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'System.Nullable<T>'
D:\VS Projects\DynamicsWebDevForce\DomainModel\DomainModel.CrmServiceReference.Designer.cs
I'm not really sure where to go from here. It appears the *.Designer.cs file might be malformed and potentially the *.edmx may have problems. I've tried many, many things to get past this final issue but it seems like an excessive amount of manual work to get the object model to compile. I've tried with several different web services both inhouse and third party with similar results. I can reproduce the problems adding services to an existing object model or building a new object model.
Any suggestions?