在vs 2012 中使用xna 4.0 做開發!


 

期待已久的vs 2012 終於發布了,做為xna 的忠實開發者,xna的studio 還沒同步發布。只能說很郁悶!還好我運氣好,在vs 2012中成功的安裝上了xna studio 4.0,想要在vs 2012 中使用全用xna 做開發,還是遇到一些小問題,問題是怎樣把xna 4.0 studio加入在VS 2012 中,

有兩個方法, GOOD LUCK!

 方法一:來自網絡

Yes, it's possible with a bit of tweak. Unfortunately, you still have to have VS 2010 installed.
 1.First, install XNA Game Studio 4.0. The easiest way is to install the Windows Phone SDK 7.1 which contains everything required.
 2.
Copy the XNA Game Extension from VS 10 to VS 11 using (may vary if not x64 computer with defaults paths) :

xcopy /e "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0" "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0"

 3.
The, open the file extension.vsixmanifest in the later directory

 4.Upgrade the Supported product version to match the new version :
 
--------------------------------------------------------------------------------
<SupportedProducts>
  <VisualStudio Version="11.0">
    <Edition>VSTS</Edition>
    <Edition>VSTD</Edition>
    <Edition>Pro</Edition>
    <Edition>VCSExpress</Edition>
    <Edition>VPDExpress</Edition>
  </VisualStudio>
</SupportedProducts>

--------------------------------------------------------------------------------

 This have been tested for Windows Games. Neither XBox nor WP7 game have been tested.

  

 方法二:在vs 2012 和vs 2010共存的情況下。以前已安裝過xna 4.0到vs 2010,使用修復來安裝。(沒有安裝過vs 2010的情況沒有做過測試。自己可以去試一下。也是可以用的),在安裝完成后會有一個錯誤提示。直接點【完成】就可以了!然后打開vs 2012,和vs 2010的情況是一樣的。開發環境就搭建好了!

如果沒有安裝上的,請安支行一下

xcopy /e "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0" "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0"

再進行安裝!

為什么我們用得好好的vs 2010要換到vs 2012呢。因了vs 2012更新。打開更快。占用資源更少,新特性更多! 

 

 一些網友的遇到的問題和解決方法:

1、使用了第二個方案,還是不能安裝成功!

     去 %LocalAppData%\Microsoft\VisualStudio\11.0\Extensions 這里把兩個.cache文件改名或刪除 重啟vs11

 

如果有問題。請與我聯系!QQ:371741579,也可以加入系統架構師群討論:57230994


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM