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
- Just restart your VS.
- Start VS again
- Clean the solution (Build> Clean Solution)
- 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:
Try resetting your Visual Studio's Setting.
Or check all dlls which are referenced.
- 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.
Check your .sln file first if it is conflicted then delete it and update your svn folder and rebuild your solution.
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.
精彩评论