Open RIA Services User Support Need help getting started  Viewed 26799 time(s), 3 post(s)., 5/9/2014 12:43:26 AM - by s9ilent

s9ilent
s9ilent 5/9/2014 12:43:26 AM

Hi, 

I'm just trying to start using open RIA and ashamedly I'm having trouble getting it to work :S. 
I'm unsure how to get the SL client to generate the proxy code from the server project.



What I've done so far is:

-Running VS 2010 Pro
-Installed: Open RIA Services Tools Support Installer
-Tried to install the: Open RIA Services Visual Studio Tooling, but it failed due to incompatible versions

9/05/2014 10:31:00 AM - Searching for applicable products...
9/05/2014 10:31:00 AM - Found installed product - Microsoft Visual Studio 2010 Professional
9/05/2014 10:31:00 AM - Found installed product - Microsoft Visual Studio 2012 Shell (Integrated)
9/05/2014 10:31:00 AM - Found installed product - Microsoft Visual Studio Express 2012 for Web
9/05/2014 10:31:00 AM - Found installed product - Global Location
9/05/2014 10:31:00 AM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.

1) Created blank solution
2) Created a RIA service project (templates from WCF RIA)
3) Installed the nuget packages to server and client projects. 
Currently the SL project has these packages:
<pre style="font-family: Consolas; color: black;">
<packages>
  <package id="OpenRiaServices.Silverlight" version="4.3.0.0" targetFramework="sl50" />
  <package id="OpenRiaServices.Silverlight.CodeGen" version="4.3.0.1" targetFramework="sl50" />
  <package id="OpenRiaServices.Silverlight.Core" version="4.3.0.0" targetFramework="sl50" />
  <package id="OpenRiaServices.ViewModel" version="4.3.0.0" targetFramework="sl50" />
</packages>
</pre> The web project has these packages
<pre style="font-family: Consolas; color: black;">
<packages>
  <package id="OpenRiaServices.Server" version="4.3.0.0" targetFramework="net40" />
  <package id="OpenRiaServices.T4" version="4.3.0.3" targetFramework="net40" />
</packages>
</pre> I create a very simple domain service (ensuring to use only the OpenRia types)
namespace TestProject.OpenRiaTestService.Web
{
 
    // TODO: Create methods containing your application logic.
    [OpenRiaServices.DomainServices.Hosting.EnableClientAccess()]
    public class OpenRiaTestDomainService : OpenRiaServices.DomainServices.Server.DomainService
    {
 
        [OpenRiaServices.DomainServices.Server.Query]
        public System.Linq.IQueryable<MyEntity> GetMyEntities() { return null; }
 
    }
 
 
    [System.Runtime.Serialization.DataContract]
    public class MyEntity
    {
 
        [System.ComponentModel.DataAnnotations.Key]
        [System.Runtime.Serialization.DataMember]
        public int MyEntityId { get; set; }
 
    }
 
}


I then hit build and the proxies do not get generated. 


I've also tried manually editing the client project file with :
InitialTargets="RIALink"
...
<Target Name="RIALink">
    <ItemGroup>
      <ProjectReference Include="..link to server project...">
        <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
      </ProjectReference>
    </ItemGroup>
  </Target>

This content has not been rated yet. 
35 Reputation 2 Total posts
1
ColinBlair
ColinBlair 5/9/2014 4:05:14 PM

The tooling only works in Visual Studio 2013. The WCF RIA Services tooling was removed form VS 2013 to make way for us to move in, that isn't the case for previous Visual Studio versions.

if you were to look at a project using WCF RIA Services, the RIA Link would look like this:

<LinkedServerProject>..path to server project</LinkedServerProject>

To switch to Open RIA Services you rename LinkedServerProject to LinkedOpenRiaServerProject.

If you are confused, the easiest solution is to use the WCF RIA Services link first, then modify the project file to change to LinkedOpenRiaServerProject. You will also need to delete the references to the WCF RIA Services client that the RIA Link automatically adds.

This content has not been rated yet. 
1539 Reputation 130 Total posts
2
s9ilent
s9ilent 5/13/2014 11:11:50 PM

Thanks Colin,

Its working now

This content has not been rated yet. 
35 Reputation 2 Total posts
3