The MIX build of RIA services has a bug that has been fixed since. But you might experience it as I did this morning and go around in circles for a while. This blog post is to help you avoid wasting that time.
I normally create my model is in its own project and hadn’t seen this problem until this morning.
If you add a model into a RIA Services project (e.g., the web project created from the Silverlight Business Application template), you must build the project before you create a new Domain Service Class with the wizard.
If the project wasn’t built in advance, then you will see the model, but not the entities:
What I did then was Cancel and build the project. But it was too late. The entities would not show up after this when I tried to create a new Domain Service class. The only way to get them to show at this point is to close and reopen Visual Studio.
It’s a bug and has been fixed post-Mix, but until then, remember to build after you add in the model file.
Hopefully you won’t spend as much time as I did trying to understand the problem. Thanks to Jeff Handley and Ron Cain from the RIA Services team who finally identified the problem and confirmed that it’s been eradicated.
Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!
2 thoughts on “This RIA Services bug from MIX bits has been fixed but until new bits are released, watch out!”
With the new bits, you will still need to build once you add a model (this is how EF works).
What we fixed is:-
1. Open up Wizard
2. Hit Cancel
3. Add a model
In the Mix bits, the newly added model will not showup. Now it will without having to restart VS.
that’s perfectly reasonalbe. It’s the same with EntityDataSource. You have to build after you add the model. But if you dn’t nad the model is not found, it presents a dialog box that says you probably need to build the project and try again.