1

I’m using visual studio 2015 to write in c#. I have a logic project which is a class library (package), and UI project which is console application (package) and I’m connecting the two with reference.

I have the error: CS0012 The type object is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”

I’ve searched online and the solution I’ve found was to change the web.config file, but I don’t have one. Another solution was to add reference to System.Runtime.dll but it made 1135 errors when I did that, such as “Predefined type System.Object is not defined or imported”. So what other solutions there are?

Jane
  • 13
  • 4
  • Possible duplicate of [Build error: You must add a reference to System.Runtime](https://stackoverflow.com/questions/22822406/build-error-you-must-add-a-reference-to-system-runtime) – Venkat Jul 17 '19 at 09:39

1 Answers1

0

I don't have VS 2015 installed right now. But from what I remember it's the same than 2017 :

Project > References > Add reference > Assembly

Grégory L
  • 612
  • 6
  • 17