Attempt to access the method failed: File.Exists()

Sep 22, 2011 at 11:37 AM

Hi, all,

 

When I run the sample "DebuggerPrimitives", I got the following exception:

"Attempt to access the method failed: File.Exists()"

This is issued from GetCurrentScreenshotNum(), in ScreenshotCapturer.cs file.

On MSDN page under the version information of File.Exists(), it says:

Silverlight

Supported in: 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

I have Windows Phone OS 7.1 SDK, not 7.0. Could that be the problem?

 

Besides, the Remarks goes this: 

Silverlight for Windows Phone Silverlight for Windows Phone

 This member has a SecurityCriticalAttribute attribute on Silverlight for Windows Phone, because the attribute was present in Silverlight 3. This attribute restricts this member to internal use. Application code that uses this member throws a MethodAccessException.

 

Have you ever tested Nine Engine on OS 7.1? What about the latest change set 62422? Is this problem likely to appear with that version?

 

Thank you!

Coordinator
Sep 22, 2011 at 11:49 AM
Please understand that I cannot check every sample on every platform during each checkin, but I'll check the windows samples at least.

The problem you're facing is that ScreenshotCapturer does not support Reach profile, so it will not work on Windows Phone. I might accidentally add that when I'm testing on windows, so you can comment out components.Add(new ScreenshotCapturer()) and see if it works.

Thanks,
Sep 22, 2011 at 12:14 PM
Dear yufeih
Yes, that solves the problem.
It’s understandable that samples may not work, but does engine itself support
Windows Phone OS 7.1?
Thanks!
Yajie.
From: [email removed]
Sent: Thursday, September 22, 2011 7:49 PM
To: [email removed]
Subject: Re: Attempt to access the method failed: File.Exists() [nine:273451]

From: yufeih

Please understand that I cannot check every sample on every platform during each checkin, but I'll check the windows samples at least.

The problem you're facing is that ScreenshotCapturer does not support Reach profile, so it will not work on Windows Phone. I might accidentally add that when I'm testing on windows, so you can comment out components.Add(new ScreenshotCapturer()) and see if it works.

Thanks,
Coordinator
Sep 22, 2011 at 12:54 PM
Yes, but not all features are available for Windows Phone, like custom effects, shadows etc.
Sep 22, 2011 at 1:06 PM
I see. Thank you yufeih.
From: [email removed]
Sent: Thursday, September 22, 2011 7:49 PM
To: [email removed]
Subject: Re: Attempt to access the method failed: File.Exists() [nine:273451]

From: yufeih

Please understand that I cannot check every sample on every platform during each checkin, but I'll check the windows samples at least.

The problem you're facing is that ScreenshotCapturer does not support Reach profile, so it will not work on Windows Phone. I might accidentally add that when I'm testing on windows, so you can comment out components.Add(new ScreenshotCapturer()) and see if it works.

Thanks,