I have a Visual Studio 2010 solution file with a number of projects in it. There is a mix of Silverlight projects (acting as modules), the Silverlight Shell project and a nu
The simplest way I've found is to declare explicitly the dependency between Silverlight project and the project that is hosting RIA service.
You have to open in a text editor your Silverlight project file and add a fragment to it:
false
This will tell msbuild to build your web service before building your Silverlight app. And it will work only when building with msbuild, VS will throw an error.
To get it built in Visual Studio also, you have to wrap this fragment in a Target and add it to InitialTargets in Project node:
false
Visual Studio 2010 will skip this target now but msbuild will use to change built order of projects.