title: Build Errors When Migrating to VS 2010 and .NET4.0 from VS 2008 and .NET3.5
body: <p>I have a VS 2008 project. This project's target framework 3.5. Everything is Ok in this situation. </p>
  
  <p>I migrated this project to VS 2010 and I also changed target framework to .Net 4.0. Then I tried to build the project. But I got an error which says me to about to use "NetFx40_LegacySecurityPolicy" switch. So I used that switch and errors related to this switch got away. But this time I encountered a different error which says "The "GenerateResource" task failed unexpectedly. System.InvalidOperationException: The security state of an AppDomain was modified by an AppDomainManager configured with the NoSecurityChanges flag.....". I searched this on web but I could not find a solution. Does anybody experiences this problem. Thanks for your help?</p>