我正在尝试创建一个使用MonoGame的Windows Phone 8库。所以我创建了一个解决方案,然后添加了一个新的WP8库项目。如果我引用MonoGame dll,它会导致Color或Vector2等类型的模糊引用,因为它与Microsoft的冲突。 This blog建议我只需要下载MonoGame NuGet包,它就可以解决问题,但它并没有,项目仍然抱怨它无法解析像'Texture2D'这样的符号。我还尝试在我的.csproj文件中手动插入以下文本,因为NuGet包似乎没有自己做,但没有任何改变。
<Target Name="MonoGame_RemoveXnaAssemblies" AfterTargets="ImplicitlyExpandTargetFramework">
<Message Text="MonoGame - Removing XNA Assembly references!" Importance="normal" />
<ItemGroup>
<ReferencePath Remove="@(ReferencePath)" Condition="'%(Filename)%(Extension)'=='Microsoft.Xna.Framework.dll'" />
<ReferencePath Remove="@(ReferencePath)" Condition="'%(Filename)%(Extension)'=='Microsoft.Xna.Framework.GamerServices.dll'" />
<ReferencePath Remove="@(ReferencePath)" Condition="'%(Filename)%(Extension)'=='Microsoft.Xna.Framework.GamerServicesExtensions.dll'" />
<ReferencePath Remove="@(ReferencePath)" Condition="'%(Filename)%(Extension)'=='Microsoft.Xna.Framework.Input.Touch.dll'" />
<ReferencePath Remove="@(ReferencePath)" Condition="'%(Filename)%(Extension)'=='Microsoft.Xna.Framework.MediaLibraryExtensions.dll'" />
</ItemGroup>
</Target>
我无法弄清楚这里出了什么问题。我尝试了所有指南和方法但没有结果。
答案 0 :(得分:0)
如果你有windows phone 8的monogame解决方案文件,那么将该解决方案添加到你的项目解决方案中并在引用中删除其他引用并添加monogame解决方案作为参考