我一直在用我的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(并且它是可移植的)所以我想知道我收到此错误的原因是:
如果我的问题有任何解决方案,不需要管理员权限或安装。
如果没有能力在XNA
,全局程序集缓存和GAC
库中安装所需的DirectX
库,则无法运行XNA
程序。
如果安装了所需的Directx
库,只要所有必需的XNA
s与可执行文件位于同一目录中,就可以运行DLL
程序。这不是默认配置,需要手动将文件复制到输出目录(与.exe文件相同,后者覆盖GAC)。
这是DLL
的标准MonoGame
分布模型。