- Home /
InvalidDataException not available?
I'm trying to throw an InvalidDataException
:
using System.IO;
// and in some method...
throw new InvalidDataException("You are a bad, bad boy.");
...and getting:
The type or namespace name `InvalidDataException' could not be found. Are you missing a directive or an assembly reference?
I see that this exception is available since .Net 2.0, but maybe it is not available in Unity, or maybe I am doing something really dumb. Which one?
Answer by Xtro · Aug 07, 2013 at 02:03 PM
Unity has a project setting which is about .net version. I think the default option is set to .Net2 subset which is a smaller framework. You can try to select the full .net option in that setting.
It's located in Player settings / other / API Compatibility Level
Your answer

Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Unity compilation order 2 Answers
Connection issues with C# and MySql using Mono. 0 Answers
Compiling C# in Visual Studio? 1 Answer