简体   繁体   English

.Xap文件与XNA Content Pipeline版本不兼容

[英].Xap file incompatible with XNA Content Pipeline version

I was looking through files that were installed with XNA framework and after that I got back to programming and I got an error: 我浏览了XNA框架安装的文件,然后回到编程状态,但出现错误:

The .xap file was created with a version of XACT that is incompatible with
the XNA Framework Content Pipeline version used by this project. Refer to the 
documentation for options to resolve this mismatch.

I don't know what it means. 我不知道这是什么意思 How can I fix it? 我该如何解决?

When updating from a differect XNA version, such as XNA 3.1 to 4.0, you need to convert your XACT files to the latest version. 从其他XNA版本(例如XNA 3.1到4.0)进行更新时,需要将XACT文件转换为最新版本。

There is an in depth guide here , but I'll highlight the points. 有一个深入的指导这里 ,但我还是要强调的点。

  1. Make a backup copy of your .xap file if you would like to keep a copy of the .xap file from before the upgrade. 如果要保留升级之前的.xap文件的副本,请制作.xap文件的备份副本。

  2. On a system with XNA Game Studio 4.0 installed, click on the Start menu > All Programs, > Microsoft XNA Game Studio 4.0 > Tools |> Microsoft Cross-Platform Audio Creation Tool 3 (XACT3). 在安装了XNA Game Studio 4.0的系统上,单击“开始”菜单>“所有程序”,>“ Microsoft XNA Game Studio 4.0”>“工具” |>“ Microsoft跨平台音频创建工具3(XACT3)”。 This is the latest version and will allow you to update your file. 这是最新版本,可让您更新文件。

  3. In the XACT3 tool, open the .xap file from the project that you upgraded to XNA 4. When it loads, you should see the following message in the XACT UI: 在XACT3工具中,从升级到XNA 4的项目中打开.xap文件。加载该文件时,您应该在XACT UI中看到以下消息:

     This project file was created with the March 2009 release of XACT. You are running the February 2010 release. If you save this project, it will be saved as the current version and may no longer work with the version of XACT it was originally created with. 
  4. Click Ok to upgrade the .xap project to the new February 2010 format. 单击“ 确定”.xap项目升级为新的2010年2月格式。

  5. Save the .xap project in the XACT UI and close the XACT UI. .xap项目保存在XACT UI中,然后关闭XACT UI。
  6. Go back to Visual Studio 2010, open the project that you upgraded from XNA Game Studio 3.1 to 4.0 and choose to build it again. 返回到Visual Studio 2010,打开从XNA Game Studio 3.1升级到4.0的项目,然后选择再次生成它。

Their is also this thread over on MSDN saying you can simply convert the .xap by opening it in XACT3, Saving, and rebuilding the project 他们也是MSDN上的该主题 ,您可以通过在XACT3中打开它,保存并重建项目来简单地转换.xap

It was a bug! 这是一个错误! I just copied my code in different project and it was ok! 我只是将代码复制到其他项目中,没关系! Thanks anyway. 不管怎么说,还是要谢谢你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM