Open RIA Services User Support OpenRiaServices.Silverlight 4.4.0.0 - compilation errors in generated code  Viewed 32827 time(s), 6 post(s)., 12/2/2014 5:26:36 PM - by cashe

cashe
cashe 12/2/2014 5:26:37 PM

I just upgraded OpenRiaServices.Silverlight to version 4.4.0.0 and I'm now getting a number of compilation errors in the generated code:

ERROR #1: The type or namespace name 'Task' could not be found in the global namespace (are you missing an assembly reference?)
ERROR #2: The type or namespace name 'CancellationToken' could not be found (are you missing a using directive or an assembly reference?)

Generated code with problem highlighted:

/// <summary>
        /// Asynchronously invokes the 'AddImageVersionVersion' method of the DomainService.
        /// </summary>
        /// <param name="imageVersionId">The value for the 'imageVersionId' parameter of this action.</param>
        /// <param name="versionId">The value for the 'versionId' parameter of this action.</param>
        /// <param name="changeDescription">The value for the 'changeDescription' parameter of this action.</param>
        /// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
        /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
        public global::Task<global::OpenRiaServices.DomainServices.Client.InvokeResult<global::CommBank.ACDC.Model.DTOs.ImageVersionUpdateTimeStamp>> AddImageVersionVersionAsync(int imageVersionId, int versionId, string changeDescription, global::System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            global::System.Collections.Generic.Dictionary<string, object> parameters = new global::System.Collections.Generic.Dictionary<string, object>();
            parameters.Add("imageVersionId", imageVersionId);
            parameters.Add("versionId", versionId);
            parameters.Add("changeDescription", changeDescription);
            this.ValidateMethod("AddImageVersionVersion", parameters);
            return this.InvokeOperationAsync<global::CommBank.ACDC.Model.DTOs.ImageVersionUpdateTimeStamp>("AddImageVersionVersion", parameters, true, cancellationToken);
        }

ERROR #3: The type or namespace name 'HasSideEffectsAttribute' could not be found in the global namespace (are you missing an assembly reference?)
ERROR #4: The type or namespace name 'HasSideEffects' could not be found in the global namespace (are you missing an assembly reference?)

Generated code with error highlighted:
<div><br />
[global::HasSideEffects(true)]
            [global::System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/ACDCDomainService/AddImageVersionVersion", ReplyAction="http://tempuri.org/ACDCDomainService/AddImageVersionVersionResponse")]
            global::System.IAsyncResult BeginAddImageVersionVersion(int imageVersionId, int versionId, string changeDescription, global::System.AsyncCallback callback, object asyncState);

The generated code doesn't have any using statements in it.</div>

This content has not been rated yet. 
20 Reputation 2 Total posts
1
ColinBlair
ColinBlair 12/8/2014 11:57:36 AM

That sounds like an error in the new async support, but I haven't been able to reproduce your problem. Could you please add this as an issue on the Codeplex site? Please include what version of Visual Studio you are using, version of the Silverlight SDK, and anything else you can think of that could help us reproduce your problem.

This content has not been rated yet. 
1539 Reputation 130 Total posts
2
cashe
cashe 12/12/2014 4:16:53 PM

I've just added this to CodePlex and provided additional information:

https://openriaservices.codeplex.com/workitem/60

This content has not been rated yet. 
20 Reputation 2 Total posts
3
akirti
akirti 12/28/2014 4:45:54 PM

I m able to map oracle SDO_Geomtery in EF 6 but RIA Domain Service Client code is not getting generated any work around. Its important Any help please 

http://stackoverflow.com/questions/27640918/spatial-data-issue-for-client-code-generation-openria

https://social.msdn.microsoft.com/Forums/silverlight/en-US/dde51c2d-b8e7-47eb-ab0b-4e03ba8d93a6/dbgeometry-property-unsupported-in-entity-framwork-6-client-code-generation-issue?forum=silverlightwcf

This content has not been rated yet. 
19 Reputation 3 Total posts
4
ColinBlair
ColinBlair 12/29/2014 3:57:31 PM

@Akirti DBGeometry doesn't exist in Silverlight which has been it difficult to add support to Open RIA Services. This is something I have looked into as my day job is heavy on GIS releated projects.

This content has not been rated yet. 
1539 Reputation 130 Total posts
5
akirti
akirti 12/29/2014 10:09:06 PM

@ColinBlair is there any work Around for this?

This content has not been rated yet. 
19 Reputation 3 Total posts
6