The assembly version in the bin folder must match the version indicated in the compilers section of web.config file.
This error happens to me when i update the server bin folder. Because the package Microsoft.CodeDom.Providers.DotNetCompilerPlatform was updated i needed to update the compilers section of web.configtoo.
It can be done by simply updating the version attribute on the below example or replacing by entire section with the developer version.
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
</compilers>
Doesn't require IIS restart.
http://localhost/[Site]. You'll get the full error message. Failing that, change your web.config as described on the error page - Basic