Home > ADX, CRM, Uncategorized > ADX Web Site Compilation Error – The type ‘System.Object’ is defined in an assembly that is not referenced.

ADX Web Site Compilation Error – The type ‘System.Object’ is defined in an assembly that is not referenced.

Recently while compiling my ADX web site, I was getting below compilation exception from all my .ascx (Views) files.

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’

Issue was bit strange as I already had “System.Runtime’ dll referred in the website

Fix:

  • Open the Web.config file and add below tag inside the <compilation> tag

<assemblies>

<add assembly=”System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” />

</assemblies>

  • Your <compilation> tag should look as below

<compilation debug=”true” targetFramework=”4.5″>

<assemblies>

<add assembly=”System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” />

</assemblies>

</compilation>

Note:

  • If your <compilation> tag already had <add assembly=”…”> tags, add only <add assembly=”System.Runtime…> tag to the existing tags.

🙂

Advertisement
Categories: ADX, CRM, Uncategorized Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: