Error MSB4018: Unexpected task "CreateRiaClientFilesTask" - attempt to access an unloaded domain AppDomain

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, ( , ).

+5
7

, , .

-, RIA, Silverlight. RIA, RIA -. RIA Silverlight, .

Silverlight app.xaml.cs, .

((WebAuthenticationService)WebContext.Current.Authentication).DomainContext 
    = new RiaNamespace.AuthenticationDomainContext();
0

McAffee. "On-Access" ( "On-Demand" ) .

Microsoft Security Essentials, . , " ASP.Net", .

  • C:\Temp\Default\NuGet.exe
  • C:\Temp\NativeImage\NuGet.exe
  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\ ASP.NET
  • NuGet.exe

  • C:\Program Files (x86)\Common Files\microsoft shared\DevServer\11.0\WebDev.WebServer40.EXE
  • C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
  • C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Microsoft.VisualStudio.Web.Host.exe
  • C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
+3

! ASP.Net, , VS .. - . - -.

+1

, (fooobar.com/questions/1107836/...): McAfee " ASP.NET. McAfee - .

: machine.config ( C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config) <compilation tempDirectory="..."/> :

<configuration>
    <!-- snip -->
    <system.web>
        <!-- snip -->
        <compilation tempDirectory="c:\A_FOLDER_THAT_IS_SKIPPED_BY_MCAFEE\TempASP.NETFiles\"/>
    </system.web>
    <!-- snip -->
</configuration>

( : fooobar.com/questions/45858/....)

+1

, . (, ), RIA Silverlight. , . , ( , "" ), .

, , , , , . ( , ), GAC , RIA.

RIA , Silverlight, . .

0

. !

0

.

"Assembly Version", .

0

All Articles