This question is different from the issues discussed here and here , although the names are the same.
The problem occurs intermittently. An error always occurs if the project has been cleaned up or created from a new check. Direct assembly immediately leads to successful completion of the assembly. I get a stack:
error MSB4018: The "CreateRiaClientFilesTask" task failed unexpectedly.
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
at System.IDisposable.Dispose()
at Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.GenerateClientProxies()
at Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.ExecuteInternal()
at Microsoft.ServiceModel.DomainServices.Tools.RiaClientFilesTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__1c.MoveNext()
The problem also occurs periodically during regular editing-build-execution cycles, and sometimes a restart from Visual Studio is required to make it work in these cases.
The problem occurs both in MSBuild and in Visual Studio 2010. I have installed all the latest updates (WCF RIA Services SP2). This happened when using Silverlight 4 tools, and upgrading to Silverlight 5 did not solve the problem. The issue also persists in the beta version of VS 11.
I was unable to change the build order as described here (link here ), since MSBuild complains about circular dependency, and Visual Studio says that I cannot reference a non-Silverlight project from Silverlight. From this page, I also tried using this link and changed the default ToolsVersion tool from 2.0 to 4.0 in the registry.
32- MSBuild, 64- . /m-, .
- ( , Silverlight, RIA -) Silverlight. 3 ( , ) .
, , , , RIA, Silverlight, ( , ).