I'm looking for a way to simply disable code generation of entities on the client. I want all other code to generate, the entities however now reside in a portable library and I'd like it to use those.
I guess there are two questions. First, is there already a configuration option for this? Second, if not, can you point me to roughly where in the code to look and I should be ok from there. I'm not after line numbers, simply narrowing it down to a project would be a help at this point :)
Many thanks in advance.
If you are using Open RIA Services, just remove the code generation NuGet package from the project. Without the code generation NuGet package no code generation will happen.
I still want it to generate the DomainContext classes, just not the entity objects. I was looking at an alternative solution involving "normal" RIA services and the T4 nuget package for it. 90pc of the solution works, but it tries to validate the domainContext at the end of its generation and throw s "Type already shared" exception which prevents it building. So I'm hoping to be able to disable that part with OpenRia.
Many thanks for taking the time to respond.
Are you willing to make your own code changes? In the ClientCodeGenerator.partial.cs file there are two lines that log the Type already shared error. They are lines 181 and 200. My suggestion would be to try changing that to LogWarning instead of LogError, compile your own copy of OpenRiaServices.DomainServices.Tools.TextTemplate, and see if that fixes your problem.
If it does, I will look at building that in somehow.
Yep, that's perfect. I spent half an hour this morning making it build (I'm using Visual Studio 2013) and searching for the errors, so that's very affirming :)
The build issues I had were with the portable library. I didn't dig too much into it, just replaced various problem sections with sections from a new empty portable library. Everything builds fine after that though.
Many thanks again.