0

I recently moved my asp.net project from my old development pc (Win7, VS2005, SQL Server 2005, .net 2.0, .net 3.5) to a new PC (Win8, VS2012, SQL Server 2008 R2, .net 2.0, .net 3.5, .net 4.5).

I can debug it as normal and it runs on development server. But when I try to publish the project I get the following error

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

I tried following solution and they did not solve my problem.

  • Setting reference copy local to TRUE
  • adding trust level full in web.config
  • Checking fusion logs (it's empty)
marc_s
  • 675,133
  • 158
  • 1,253
  • 1,388
Susantha
  • 143
  • 3
  • 1
    Are you using Entity Framework? If so, make sure you've set the reference copy local to these as well: System.Data.Entity; System.Web.Entity; Also, try the suggestions here: http://stackoverflow.com/questions/1091853/error-message-unable-to-load-one-or-more-of-the-requested-types-retrieve-the-l – EvilBeer Sep 01 '14 at 13:07
  • 1
    Remove Temp Files that may problem or check added references are updated – Amol Sep 01 '14 at 13:16

1 Answers1

0

I just turned off "generate Serialization assembly" for Release Configuration in properties and it worked without any other fixes.

Susantha
  • 143
  • 3