天天看點

How-to: 利用Visual Studio更新Windows Phone 7工程

How-to: 利用Visual Studio更新Windows Phone 7工程

圖1:建立工程時的OS選擇界面

        那麼,對于之前的應用程式工程,如果要更新到新的OS版本,操作起來也非常的友善,下面我們就按順序給出操作步驟。以《101.Windows.Phone.7.Apps,Volume.I》中第27章的源代碼為例,用Visual Studio 2010 Express for Windows Phone打開Groceries.sln檔案,如下圖2所示:

How-to: 利用Visual Studio更新Windows Phone 7工程

圖2:打開應用程式界面

        在項目的資源浏覽器中,右鍵點選項目的工程,如下圖3所示,彈出右鍵菜單,點選其中的“Upgrate to Windows Phone 7.1”

How-to: 利用Visual Studio更新Windows Phone 7工程

圖3:項目右鍵菜單

        之後,開發環境彈出一個提示資訊框,提醒使用者:工程中引用的任何其他工程不會被更新,如下圖4所示。

How-to: 利用Visual Studio更新Windows Phone 7工程

圖4:項目更新提醒

        在更新完成以後,進行編譯,系統提示缺少元件:

The referenced component 'Microsoft.Phone.Controls.Toolkit' could not be found.     

How-to: 利用Visual Studio更新Windows Phone 7工程

圖5:Silverlight for Windows Phone Tookit

        安裝完畢以後,我們在項目的引用中删除舊的引用,手動添加新的引用,如下圖6所示:

How-to: 利用Visual Studio更新Windows Phone 7工程

圖6: 删除舊的引用

        新的dll路徑位于:%\Program Files\Microsoft SDKs\Windows Phone\v7.1\Toolkit\Oct11\Bin,添加引用的界面如下圖7所示:

How-to: 利用Visual Studio更新Windows Phone 7工程

圖7:添加新的引用

        至此,可以進行工程的編譯和調試。

本文轉自施炯部落格園部落格,原文連結:http://www.cnblogs.com/dearsj001/archive/2011/11/30/UpgratetoOS7_1.html,如需轉載請自行聯系原作者