Demos_GameBase's samples can't run in Silverlight

Feb 8, 2011 at 11:17 PM

The error is:

System.Windows.Markup.XamlParseException occurred
  Message=对符合指定的绑定约束的类型“Demo_MouseBasics.GameMain”调用构造函数时发生异常。 [Line: 12 Position: 35]
  LineNumber=12
  LinePosition=35
  StackTrace:
       位于 System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       位于 SilverlightGame1.MainPage.InitializeComponent()
       位于 SilverlightGame1.MainPage..ctor()
  InnerException: System.Security.SecurityException
       Message=不允许进行文件操作。拒绝访问路径“”。
       StackTrace:
            位于 System.IO.FileSecurityState.EnsureState()
            位于 System.IO.Directory.InternalGetCurrentDirectory(Boolean checkHost)
            位于 System.IO.Directory.GetCurrentDirectory()
            位于 XenGameBase.GameBase..ctor()
            位于 Demo_MouseBasics.GameMain..ctor()
       InnerException:

Coordinator
Feb 8, 2011 at 11:22 PM

Ah, I'll take a look at this. I suspect it's the new plugin loading code that's throwing the GetCurrentDirectory() exception but I will need to repro the issue.

Thanks, chszu!

Coordinator
Feb 8, 2011 at 11:22 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Feb 9, 2011 at 5:22 AM

Hey chszu, I fixed the issue and checked in Demo_MouseBasics_Silverlight if you want to check it out. Thanks and hope that helps!