Reputation: 13
I'm using VS 2008 on a Windows 8 laptop and get a NotSupportedException
when the debugger hits this line of code System.IO.Directory.GetCurrentDirectory()
. Could anyone tell me why am I getting this error?
Upvotes: 0
Views: 669
Reputation: 12616
Based on the documentation there are only two situation in which you can get this exception.
Windows 8 is not Windows CE, so I guess you have installed .NET Compact Framework.
Upvotes: 2
Reputation: 676
I recommend to use System.Reflection.Assembly.GetExecutingAssembly.Location
string startuppath = IO.Path.GetFolderName(System.Reflection.Assembly.GetExecutingAssembly.Location);
Upvotes: -1