开发者

Cannot compile solution in VS due "Attempted to access an unloaded AppDomain" -- how to pin it down?

I have a C#/ASP.Net solution in VS (2008) with several projects within it. When I try to compile it I get one error only:

Attempted to access an unloaded AppDomain

No line code, no project name, noth开发者_Python百科ing. Just such error.

How can I pin down this error -- i.e. the cause, or even better -- how can I solve it and continue compilation?

Thank you in advance.


Shut down Visual Studio and reopen it. Then clean the Temp folder.

For that press Windows+R and type %Temp% and click Ok, then delete everything.


If this error comes with VS follow these steps

  1. Just restart your VS.
  2. Start VS again
  3. Clean the solution (Build> Clean Solution)
  4. Rebuild your project again

If this error comes with IIS

  • Restart (recycle) the IIS Application Pools in IIS Manager, After restarting check run the solution again!


There are many possibilities:

  1. Try resetting your Visual Studio's Setting.

  2. Or check all dlls which are referenced.

  3. Check all the namespaces which are being used in your application, Do they exist?


I am experiencing the same in Visual Studio 2012 - but ONLY on websites hosted on UNC share. My solution (when it occur) is to unload the web project and reload it again. Then in works for some time again.

The problem as I recall it is, that the hosted UNC share (or the workstation trying to access it) is running an x86 version of Windows, which does not allow to many open network connections.

In my experience these sort of problems disappear on true x64 environments.

Cheers.


it means, there is something in WebConfig/AppConfig not compatible and cannot load.

For ex. İf you published project, check app_data/publish profiles, delete them.


  1. Check your .sln file first if it is conflicted then delete it and update your svn folder and rebuild your solution.

  2. Rebuild your solution


It's also possible that your unit test started up a thread but didn't close it. Ensure your threads are all closed before completion. It might be a good idea to verify all your unit tests are running and passing correctly.


Exit the local webserver(IIS express) from the system tray and delete asp.net temp files from temporary folder & then try clean,rebuild and run your application


Following are the steps i followed to get rid of such error-

  • Press Windows+R , write %Temp% and hit enter. Now,delete all the temporary files from the directory.
  • Restart your visual studio.
  • Clean your project solution from Solution explorer in Visual studio List item.
  • Rebuild the project & Run . It should work expected.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜