C# MonoDevelop Auto-Complete Messages Disagree with Compiler
I'm working in Unity 4.1.5f1 with MonoDevelop 2.8.2 (i.e. current Unity
setup as of writing), and I'm getting a weird conflict between what
auto-complete tells me, and what the compiler is telling me.
In the Unity window, which is where compiler messages show up in the Unity
framework, I'm getting this message:
Assets/Scripts/Track/Serialisation/FilePath.cs(74,31): error CS0246: The
type or namespace name 'InvalidDataException' could not be found. Are you
missing a using directive or an assembly reference?
However, auto-complete seems to understand what it is when I hover over it.
Also, I discovered InvalidDataException using auto-complete, I didn't type
it in manually. According to Microsoft, it's there:
http://msdn.microsoft.com/en-us/library/system.io.invaliddataexception.aspx
Before you ask, at the top of my file I have the correct using statement:
using System.IO;
I've also tried a fully-qualified name:
catch(System.IO.InvalidDataException ex)
{
Debug.Log(ex.Message);
return false;
}
But then the compiler is even more specific in its disagreement with
auto-complete:
Assets/Scripts/Track/Serialisation/FilePath.cs(74,41): error CS0234: The
type or namespace name 'InvalidDataException' does not exist in the
namespace 'System.IO'. Are you missing an assembly reference?
Does anybody know what's happening here? I feel like this must be a trap
for young players, but searching yields very little. Usually when the IDE
does something like this I just restart it, but that hasn't made the
problem go away.
No comments:
Post a Comment