Microsoft.Xna.Framework.Game not found?

本文关键字:found not Game Xna Framework Microsoft | 更新日期: 2023-09-27 18:19:08

我一直在我的Uni笔记本电脑上用c#编程,方便地不允许任何安装。

无论如何,当我在搜索列表中注意到Microsoft.Xna.Framework 3.0时,使用ShaprDevelopPortable我正在研究一个项目。当我收到以下错误时,我立即尝试编译XNA-4.0的默认模板:

Found conflicts between different versions of the same dependent assembly. (MSB3247)
The type or namespace name 'Game' does not exist in the namespace 'Microsoft.Xna.Framework' (are you missing an assembly reference?) (CS0234) 
The type or namespace name 'GraphicsDeviceManager' could not be found (are you missing a using directive or an assembly reference?) (CS0246)
The type or namespace name 'GameTime' could not be found (are you missing a using directive or an assembly reference?) (CS0246)
The type or namespace name 'GameTime' could not be found (are you missing a using directive or an assembly reference?) (CS0246)

现在我不知道GameTime的功能是否已经从XNA-3.0移到了XNA-4.0,但Microsoft.Xna.Framework.Game肯定还在那里?

请注意,我使用的SharpDevelop版本是4.2(它是可移植的),所以我想知道我得到这个错误的原因是:

  • Microsoft XNA未正确安装
  • 或SharpDevelop的问题

如果有任何解决我的问题,不需要管理员权限或安装。

Microsoft.Xna.Framework.Game not found?

如果不能在GAC、全局汇编缓存、 DirectX库中安装所需的XNA库,则不可能运行XNA程序。

如果安装了所需的Directx库,则只要所有所需的DLL库与可执行文件位于同一目录中,就可以运行XNA程序。这不是默认配置,并且需要手动将文件复制到输出目录(与覆盖GAC的.exe文件相同)。

这是MonoGame的标准DLL分布模型