[Cordova] Visual Studio Tools for Apache Cordova CTP 3.0 發佈

[Cordova] Visual Studio Tools for Apache Cordova CTP 3.0 發佈

隨著Visual Studio 2013 Update 4的發佈,Visual Studio Tools for Apache Cordova 最新進展來到 CTP 3.0 版本 ,更新的方式必須先安裝完 Visual Studio 2013 Update 4,再到 http://www.microsoft.com/en-us/download/details.aspx?id=42675 下載 Visual Studio Tools for Apache Cordova CTP 3.0 版本進行安裝,不過若先前已有安裝過 Cordova CTP 2.0,那麼必須先進行手動移除,否則會無法安裝。

image

如果使用控制台的方式去移除,那麼有可能不會成功 (至少筆者是不成功的),但CTP版咩,來個地雷也是很正常的,所幸上圖的訊息給了一個KB來說明解決方式,只不過這又是另一個雷了。

image

 

在這個KB(http://support.microsoft.com/kb/3014133)裡告訴你移除的指令如下( 原文內容把指令給中文化了,請用英文 )

"%ProgramData%\Package Cache\{dea88246-f74a-4171-ad6c-d9c978bf2973}\vs2013mda_0.1.exe" /uninstall /passive /force /burn.ignoredependencies={53d408db-eb91-43fb-9d8f-167681c19763};vsupdate_KB2829760

但請注意紅字的GUID字串,如果照上面寫的,可能會跟筆者一樣發現根本找不到那個目錄的存在,如果遇到這個的情況,請依下列方式找到您環境裡真正的那個GUID值。

  1. 開啟檔案總管,輸入 %ProgramData%\Package Cache
  2. 在Package Cache目錄內搜尋vs2013mda_0.1.EXE,就可以找到真正的GUID值

把找到的GUID值取代上面指令的那個紅字區塊,然後應該就可以進行手動移除了,而移除的時間需要很久就是了,當程序跑完後可再回到控制台裡的查看,有成功的話應該就會找不到CTP 2.0的版本。

移除完成後接著就可以進行Visual Studio Tools for Apache Cordova CTP 3.0 版本安裝,同樣的也要一段不算短的時間,完成後試著開啟原本CTP 2.0版本所建的專案來試跑看看。如果您想了解Visual Studio Tools for Apache Cordova 是怎麼一回事,可以參考今年 TechDays 2014 這堂課 ( http://channel9.msdn.com/events/TechDays/TechDays-Taiwan-2014/?sort=sequential&direction=desc&term=&s=ian-chen#theSessions )。

 image

SNAGHTML13abcb1image

CTP 3.0 版本終於把config.xml介面改的更親近些了,在這個版本裡把不同OS系統分開為獨立的頁籤區塊,在設定上就會比較清楚明白一些,此外Plugins的部份也顯示更多的資料,包含版本號及支援平台等。

image

image

另外同一時間,Visual Studio 2015 Preview 版本也發佈了,在Visual Studio 2015 Preview 版本裡 Cordova 已經是內建了,不須額外再安裝,可以看到在 JavaScript及TypeScript語言裡的Store Apps已有提供 Apache Cordova 專案類型範本,並且在Visual Studio 2015 Preview 還另外提供了另一套基於Hyper-V的Andriod 模擬器,比起原本的 Andriod 模擬器在速度上會比較快,就某種程度上來說可以加快的開發速度,比較可惜的是據目前官方消息,這個自製的Andriod 模擬器在Visual Studio 2013 只有 Xamarin的專案有提供,在Apache Cordova 的專案沒有。

With all three of those choices, when you start debugging, you must first choose a target. That target can be a device, or it can be one of many emulators that you may have running on your machine. Let’s see how to choose a debug target for Cordova and C++ in Visual Studio 2015 Preview, and for Xamarin in Visual Studio 2013.

 

image

clip_image001

 clip_image005

順帶一提,如果安裝了 Visual Studio 2013 Update 4,而沒有升級 Cordova CTP 3.0的話,那麼在啟動 Visual Studio 2013 可能會有以下這個訊息,But just message , don't worry。

image

 

Ref :

http://support.microsoft.com/kb/3014133

http://www.visualstudio.com/en-us/explore/cordova-vs.aspx

http://blogs.msdn.com/b/visualstudioalm/archive/2014/11/12/introducing-visual-studio-s-emulator-for-android.aspx

 

若本文對您有所幫助,歡迎轉貼,但請在加註【轉貼】及來源出處,並在附上本篇的超連結,感恩您的配合囉。

By No.18