Error in reference. Problem in build

Hi,
I am getting this error. Please help. Actually I am building my application but it is not building successfully.

When I play game it is OK. But when I try to build it. It does not build a class and due to that button click is not possible in the game. When I tried to buid the classes then it is showing this error. It is asking reference to the namespace. Please help.

Error CS0012: The type ‘System.ComponentModel.MarshalByValueComponent’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e’. (CS0012) (Assembly-CSharp)

Hi syclamoth,

OK but there is another issue. Initially I build and run my app pressing ctrl+B. It was not showing any error. It build successfully. But it was not loading textures on the scene. Also button event event was not working. I have taken an empty gameobject and attached my c# script file to this game object. But it is not loading the class. When I play game everything is all right. It is working fine. But when I build application to create exe it is not working. Please help as I am new to unity and I am not able to find the reason. When I build class in mono developer it is showing these error.

Hi,

I just got my answer. There was a problem in version while I was adding dll to my application. I just changed System.Data from version 3.5 to 2.0 and problem get solved. Thanks to all who helped me directly or indirectly. Thank you very much.