| 

.NET C# Java Javascript Exception

8

Weird Error Message:

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0012: The type ‘System.Object’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.

Fix:

Put this Assembly-Reference in the web.config:

<compilation debug="true" targetFramework="4.5">
 <assemblies>
 <add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
 </assemblies>
</compilation>

Reason:

This error occures when you are using Portable Class Libraries (PCLs) inside ASP.NET Projects. This Blogpost provides a pretty good answer. In short: It’s an issue between runtime and build time - PCLs that are used in Razor are runtime stuff.

I (re-)blogged this because I had this issue more than once ;)

Hope this helps!

.net web csharp asp.net javascript html5 asp.net-mvc jquery css iis
Schreibe einen Kommentar:
Themen:
iis css jquery asp.net-mvc html5 javascript asp.net csharp web .net
Entweder einloggen... ...oder ohne Wartezeit registrieren
Benutzername
Passwort
Passwort wiederholen
E-Mail
TOP TECHNOLOGIES CONSULTING GmbH