Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7937937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:39:41+00:00 2026-06-03T22:39:41+00:00

This question is different from the questions posted here and here even though the

  • 0

This question is different from the questions posted here and here even though the titles are the same.

The problem arises intermittently. The error always occurs if the project has been cleaned or is being built from a fresh checkout. Pushing build again immediately usually results in the build succeeding. The stacktrace I get is:

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 intermittently during regular edit-build-execute cycles, and sometimes a restart from Visual Studio is required to make it work on these occasions.

The problem occurs both in MSBuild and Visual Studio 2010. I have all of the latest updates installed (WCF RIA Services SP2). It occurred when using the Silverlight 4 tools, and upgrading to Silverlight 5 has not solved the problem. The problem also still occurs in the beta of VS 11.

I’ve not been able to change the order of the build as described here (referenced from here) as MSBuild complains of a circular dependency and Visual Studio says that I can’t reference a non-Silverlight project from a Silverlight one. From that page I have also tried following this link and changed the default ToolsVersion from 2.0 to 4.0 in the registry.

I’m definitely using the 32 bit version of MSBuild, as trying to use the 64 bit version fails with failing to Hydrate the entity framework model. I’m not using the /m switch to build it in parallel either.

The project was initially a web project (which hosts the site that the Silverlight control lives on, RIA services, and contains the Business logic) and a Silverlight project. Changing this to 3 projects (with a class library containing the logic) doesn’t make any difference.

The next thing I’m planning on trying is having the project hosting the RIA service separate from the one hosting the Silverlight app, but that’s not ideal for us (and I’m not even sure it will work).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:39:44+00:00Added an answer on June 3, 2026 at 10:39 pm

    I found a solution to this problem which has so far fixed the issue on every server and client that I’ve run it from.

    My initial project layout had a Web Project which acted as a host for both the RIA components and the Silverlight app itself. I created a class library for the RIA services, moved all of my RIA logic into there and added a reference to it from the Web Project. Then I updated the RIA link in Silverlight to point to this new project.

    I had to add the following line into the Silverlight app.xaml.cs file so that authentication worked.

    ((WebAuthenticationService)WebContext.Current.Authentication).DomainContext 
        = new RiaNamespace.AuthenticationDomainContext();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is similar to (but different from) this question . Here is some simple
Following on from a question I posted yesterday. Found here: Append different div id
[Please note that this is a different question from the already answered How to
(Similar in spirit to but different in practice from this question .) Is there
A while back I posted a different question regarding column order. While this question
I believe this question is slightly different than similar ones asked on here before
I had posted a similar question earlier - a slightly different requirement here. I
This is a derivative question of a question I have posted here: In App
This question is related to the question posted here: Why isn't my custom WCF
I have posted a question on here previously asking similar advise, but this project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.