-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenRiaServices.Silverlight 4.4.0.0 - compilation errors in generated code #60
Comments
[ColinBlair@2014-12-16] |
[danneesset@2015-01-03] 1: Try to first close visual studio and then delete all your "Generated_Code", "bin" and "obj" folders and try again, in some rare instances you can end up with old assemblies beeing used by the code generator. 2: If that does not solve your problems: 3:
|
[cashe@2015-01-05]
Upgrading all packages to 4.4.0.0 didn't help.
This didn't help.
I verified that everything was on 4.4.0.0
I use the "default" code generator. I added the OpenRiaServices.T4 package to the server projects, cleaned the solution and generated files etc, restarted visual studio, regenerated the client code and got the same errors.
3 I'm getting a new warning which may be relevant:
I'm not sure how to retrieve the LoaderExceptions property to provide you with more information. This warning might be related to the fact that I recently introduced dependency injection (Autofac) to the domain services; they no longer have parameterless constructors. This warning exists when I'm on 4.3.0.0 but the solution builds fine. |
[ColinBlair@2015-01-05] I have a second user who is getting the same error but I haven't been able to reproduce the problem. If you can create a solution that demonstrates the problem I would love to get a copy of it and see if I can reproduce the problem. |
[matbel@2015-01-20]
With a decompiler, this is the only info I see:
Or
So I can't tell if it's 4.3 or 4.4 |
[ColinBlair@2015-01-20] First off, you are always welcome to send me your solution through email. If the zip file is too large a link to a OneDrive file / DropBox, etc would work for me as well. My email is easy, mail at then my first and last name followed by .com Second, here is the cleanup instructions I have used in the past:
|
[matbel@2015-01-21] |
[matbel@2015-01-21]
|
[marcelot@2015-02-12] |
[ColinBlair@2015-02-12] |
[danneesset@2015-02-15] If so please have a look at the following page with details of how to debugg the code generation projects and let us know if it helped you: |
[matbel@2015-02-16] |
[danneesset@2015-02-19] I will look into making sure that the code generation works when OpenRiaClientUseFullTypeNames is set to true and will hopefully have a solution within the next week, but I would appreciate if anybody could check if the problems dissapear if you set it to false. |
[matbel@2015-02-19] |
[danneesset@2015-02-22] |
[danneesset@2015-02-22] Please feel free to fetch the latest version and compile OpenRiaServices.DomainServices.Tools yourself and replace the verion in "packages\OpenRiaServices.Client.CodeGen.4.4.0.*\build" if you want to try it |
[ColinBlair@2015-02-23] |
[danneesset@2015-03-01] The code gen works for me, but I would appreciate if anybody else would like to test it before it is published. The nupkg is just a zip file so you should be able to open it and replace the contents of your build directory with the new version. Don't worry about it not being the Silverlight package, the next Silverlight package (4.4.0.3) will depend on the OpenRiaServices.Client.CodeGen where the actual implementation will be so that we only have to maintain one version of the code generation. |
[matbel@2015-03-02] |
Issue closed by danneesset with comment Reason closed |
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:
///
/// Asynchronously invokes the 'AddImageVersionVersion' method of the DomainService.
///
/// The value for the 'imageVersionId' parameter of this action.
/// The value for the 'versionId' parameter of this action.
/// The value for the 'changeDescription' parameter of this action.
/// A cancellation token that can be used to cancel the work
/// An operation instance that can be used to manage the asynchronous request.
public global::Task<global::OpenRiaServices.DomainServices.Client.InvokeResultglobal::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.InvokeOperationAsyncglobal::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:
[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.
I'm using Visual Studio 2013 Update 3
The server-side OpenRiaServices library is a .NET Framework 4 class library (referenced by an ASP.NET project).
The client-side OpenRiaServices library is a Silverlight 5 class library (referenced by a Silverlight Application project).
Microsoft® Silverlight® 5 SDK is installed
Version 4.3.0.0 of OpenRiaServices was working fine
Build Output is attached
Attachments
Build Output.txt
This work item was migrated from CodePlex
CodePlex work item ID: '60'
Vote count: '2'
The text was updated successfully, but these errors were encountered: