I'm trying to read in some sample data from an XML file in a Silverlight project, and this line:
using (TextReader reader = new StreamReader(@"C:\Users\mike\Documents\Visual Studio 2008\Projects\test\test\Data\test.xml"))
Throws this exception:
System.MethodAccessException: Attempt to access the method failed: System.IO.StreamReader..ctor(System.String)
--- Inner Exception --- Attempt to access the method failed: System.IO.StreamReader..ctor(System.String)
I'm positive that the path is correct, I copied it out of explorer (pasting the filename at the end) to be sure.
What might cause this problem?