我已经在C++中创建了一个OpenGL控件,希望在WPF应用程序中使用它。我已经成功完成了这个任务,并且在Vista和XP机器上工作得很好,但是当我在Windows 7机器上打开我的项目时,WPF设计窗口无法显示。当我尝试运行程序时,会出现以下异常:
"Cannot create instance of 'Window1' defined in assembly 'LabUserInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'Window1.xaml' Line 1 Position 9."
'LabUserInterface' 是我的OpenGL内容所在的地方。此外,我在WPF窗口中也遇到了以下错误:
"Type 'MS.Internal.Permissions.UserInitiatedNavigationPermission' in Assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable."