MonoDevelop suddenly inexplicably warning all marked as error

Source: Internet
Author: User

This is a "pit" about MonoDevelop.

When we compile game scripts with MonoDevelop, we usually have a few caveats, which are generally harmless.

Does not affect the game run. But then, one day, MonoDevelop a psycho. Mark some warnings as errors, resulting in unity

The game cannot be run. To view the output information of the MonoDevelop, the following information is found:

Unhandled Exception:
Mono.CSharp.InternalErrorException:/player/playeranimationcontroller.cs (89,17): <errorillustration >C__ITERATOR39---> System.ArgumentException:Label not marked
At System.Reflection.Emit.ILGenerator.label_fixup () [0x00000] in <filename unknown>:0
At System.Reflection.Emit.MethodBuilder.fixup () [0x00000] in <filename unknown>:0

...

Well, errorillustration is a function that we write ourselves, look at the code of the function.

1 IEnumerator errorillustration ()2         {3             yield return NULL;4 5             if(false )6             {7                 yield return NULL;8 9             }Ten  One             yield  Break; A}
View Code

There is a unreachable code, is this the problem?

Try to remove this code, MonoDevelop actually back to normal,

It seems that if Ctrip has a unreachable code, it will cause the monodevelop to produce an internal exception.

MonoDevelop suddenly inexplicably warning all marked as error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.