Litium 7 not starting: Cannot load a reference assembly for execution

After closing and reopening Visual Studio my local installation of Litium 7 does not start with error:

Server Error in '/' Application.
## *Cannot load a reference assembly for execution.*

**Description:**  An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

**Exception Details:**  System.BadImageFormatException: Cannot load a reference assembly for execution.

Litium version: 7.0

  1. Expand References in the Litium.Accelerator.Mvc project
  2. Right-click System.Runtime.InteropServices.RuntimeInformation and select properties
  3. Change Copy local to false
  4. Delete the /Bin directory and rebuild the site

2 Likes

I usually just delete the obj and bin folder from Web project and build again, then it runs ok.