When porting a Silverlight solution to WPF there are currently a number of issues to be aware of.

Issues which should be fixable for 4.5.0 release

1. Cookies are not handled out of the box (See Issue #90, a fix will come) , you have to add the fix suggested at http://blogs.msdn.com/b/kylemc/archive/2010/05/14/ria-services-authentication-out-of-browser.aspx (
2. Code generation of WebContext and authentication service is linked to presence of “<SilverlightApplication>true….” In the project file so this needs to be manually added
3. You will probably need to add a build dependency on your web project from your client project or you might get errors saying that the web project has not yet been built.

Other Problems / Issues
1. You get compile time errors if you mix OpenRia codegen with some types of XAML pages/resources.
The best approach is to get all your code generation to happen in a separate class library which is then referenced by the rest of your application.
You will probably need to set the DomainContext property manually when creating the FormsAuthentication to your AuthenticationContext
2. You need to wait creating your WebContext until Application Startup (or you will get the wrong SyncronizationContext) instead of in Application constructor.

My recommendation is that you start with the following 2 steps before starting your migration

1. Refactor your project so that you separate your code generation to a project without XAML (se 3. Below)
2. Make sure that you use the latest prerelease version of openria services and that you manually configure a RiaDomainClientFactory for DomainContext.DomainClientFactory.

Last edited Mar 28, 2016 at 9:06 AM by danneesset, version 1


Deken May 31, 2016 at 1:54 PM 
I started getting this build error:

Metadata file 'C:\Projects\t\HttpClient\OpenRiaServices.DomainServices.PortableWeb\bin\Debug\WpfClient.dll' could not be found

I verified the build order and everything looks good. I did try to add support for Entity Framework by adding the appropriate packages; but backed all that out and compared the project files to the original which I downloaded from here and I still get the error. Dead in the water.