简体   繁体   中英

error cs0103 The Name 'IEnumerator' does not exist in the current context

I have problem in C# development in monodevelop tool for unity. In that many methods and Interfaces not found like IEnumerator and Array.Length .

I found Same question but it's not work for me. because solution of that question is import System.Collections namespace but I was already imported it then also throw compile time error. I Have installed latest .Net Framework on Windows 8.1 Os.

How i solve this problem?

在此处输入图片说明

I have had that problem before. I was using the latest .net framework and I went to Programs and Features within control panel (if you're using Windows) and selected the box to also run .net framework 3.5 I think it was.

I then shut down my project after saving, restarted my machine and it worked fine

Close the project from MonoDevelop by doing Right Click. And open the *.sln file manually in MonoDevelop

I'm using Debian and I had your error, this error , and both was fixed by installing these packages:

mono-reference-assemblies-2.0
mono-reference-assemblies-3.5

Using APT:

sudo apt install mono-reference-assemblies-2.0 mono-reference-assemblies-3.5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM