x


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)

more ▼

asked May 10 '12 at 02:37 PM

hi_rahul86 gravatar image

hi_rahul86
4 11 13 14

Where does the error occur? Is it in one of your scripts? Try adding 'using System.ComponentModel' at the top of your file.

May 10 '12 at 02:38 PM syclamoth

Well, its also not working. I am trying to build my c# files in mono developer and it is showing this error. When I play there is no error but when I try to build it, error through.

May 11 '12 at 10:48 AM hi_rahul86

Don't build your files in MonoDevelop. You should leave that job to Unity- there's never any need to build something inside the IDE itself.

May 11 '12 at 11:13 AM syclamoth
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered May 14 '12 at 05:12 PM

hi_rahul86 gravatar image

hi_rahul86
4 11 13 14

(comments are locked)
10|3000 characters needed characters left

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.

more ▼

answered May 11 '12 at 08:14 PM

hi_rahul86 gravatar image

hi_rahul86
4 11 13 14

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3892
x428
x48

asked: May 10 '12 at 02:37 PM

Seen: 838 times

Last Updated: May 14 '12 at 05:12 PM