Developing Open RIA Services Open RIA Services + TFS (online) build server  Viewed 29621 time(s), 7 post(s)., 2/14/2014 9:08:44 PM - by JacquesBourque

JacquesBourque
JacquesBourque 2/14/2014 9:08:44 PM

Hi,

I just upgraded our projet to use Open RIA Services and I am having issues when building the solution on our TFS (online) build server. Looking at the errors, it seems that the client-side code generation is not working. Is there something I need to do to make it work? 

NOTE: It is working locally... 

Thanks!

Jacques.

This content has not been rated yet. 
30 Reputation 4 Total posts
1
ColinBlair
ColinBlair 2/14/2014 9:52:02 PM

Is your TFS server setup to restore NuGet and does it have a current version of NuGet installed? I have not tried doing a compile on a TFS build server myself, but NuGet is the first thing I would check.

This content has not been rated yet. 
1539 Reputation 130 Total posts
2
JacquesBourque
JacquesBourque 2/15/2014 3:35:15 AM

Hi Colin,

Yes the server is configured to restore the NuGet packages. I have plenty of packages in my projets. :) As for the server itself, it is all managed by Microsoft and I do not have access to it.

There wasn't much information as to how we need to configure the NuGet packages for Open RIA. Maybe I did not add the reference to the right project? Right now, we have a lot of projects but we only have 1 project that is the RIA link, Do we need to add the NuGet reference to the Silverlight project or the server one?

This content has not been rated yet. 
30 Reputation 4 Total posts
3
ColinBlair
ColinBlair 2/15/2014 6:22:36 AM

The code generation is performed by the OpenRiaServices.Silverlight.Codegeneration NuGet package. The OpenRiaServices.Silverlight NuGet package includes the CodeGeneration package so, unless you manually installed the OpenRiaServices.Silverlight.Core package instead of OpenRiaServices.Silverlight you should have the correct packages installed.

All that being said, for the client code to generate a valid connection is needed to the SQL Server if you are using DbDomainService or LinqToEntitiesDomainService. Is your database on Azure or somewhere else where the TFS server can see it? Was the build working correctly with WCF RIA Services?

This content has not been rated yet. 
1539 Reputation 130 Total posts
4
JacquesBourque
JacquesBourque 2/17/2014 2:22:25 PM

Hi Colin,

To respond to your question, yes it was working before with WCF Ria Services and yes, my database is in Azure and accessible. 

Good news though, I fixed my issue. There is two things I did (not sure if both are required but I'll post them so that others can benefits from it).

1. I needed to add two .targets files in my source control. The first one is "packages\OpenRiaServices.Server.4.3.0.0\tools\OpenRiaServices.Validation.targets" and the second one is "packages\OpenRiaServices.Silverlight.CodeGen.4.3.0.1\build\OpenRiaServices.Silverlight.CodeGen.targets". I think this has something to do with the way the TFS build server reads the .targets in the solution/projects. There was a problem before (not sure if it has been fixed) that the .targets was read before the restore of the NuGet packages was done.

2. The project flagged as my Silverlight application is not the RIA linked project. I was adding the package for the code generation to only the RIA Linked project. I added the NuGet reference to my main Silverlight project.

Thank you again for your time! Keep up the good work! :)

This content has not been rated yet. 
30 Reputation 4 Total posts
5
ColinBlair
ColinBlair 2/18/2014 3:43:26 PM

Looking at the NuGet release notes, looks like that is something that NuGet fixed very recently (January 29th was the release date) so I am guessing that the TFS servers at Microsoft haven't updated yet.

This content has not been rated yet. 
1539 Reputation 130 Total posts
6
JacquesBourque
JacquesBourque 2/18/2014 5:49:03 PM

Probably... This has been a pain for us for other packages.

Thanks Colin!

This content has not been rated yet. 
30 Reputation 4 Total posts
7