Asp.net 4.5 : The type 'System.Object' is defined in an assembly that is not referenced
Dung Do Tien May 12 2021 942
I have a solution with many projects in Asp.Net Framework 4.5.2 and I want to add other project support trace logs to the Kafka server.
My project still working fine but when I add existed that project into the solution I got an error the type is defined in an assembly that is not referenced. you must add a reference to assembly
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. D:Myproject\App_Start\WebApiConfig.cs
They are same have the same project target is 4.5.2. I tried to rebuild but it does still not work.
How can I resolve this issue?
Have 1 answer(s) found.
Xhana Ahmetaj May 12 2021
You need to check
web.configof the new project you add more to your solution, It must has config below:
<compilation targetFramework="4.5" debug="true" > <assemblies> <add assembly="System.Runtime, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </assemblies> </compilation>
You need to add
System.Runtimepackage, It'll resolve your issues.
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.