我正在使用 Xna 3.0(使用 C# 4.0)并在 SharpDevelopPortable 中编译空白模板时出现此错误:
System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
at Test_XNA.Game1..ctor()
at Test_XNA.Program.Main() in c:\Users\%username%\Documents\Stuff\SharpDevelopPortable\Data\SharpDevelop Projects\Test_XNA\Test_XNA\Program.cs:line 9
这突出了:
using System;
namespace Test_XNA
{
static class Program
{
static void Main()
{
Game1 game = new Game1(); // <-- This line is highlighted
game.Run();
}
}
}
需要注意的是,我的 Xna 版本和 C# 版本是不同的。另外我不是管理员,这就是我使用 Xna 3.0 的原因。我也收到了这个警告:
Found conflicts between different versions of the same dependent assembly. (MSB3247)
虽然我不确定这意味着什么。
任何建议,将不胜感激。