2011-04-22 31 views
0

我剛剛安裝了Windows Phone開發人員工具,因爲我想用手機玩並可能發佈一些應用程序。爲什麼Visual Studio 2010無法編譯默認的Windows Phone Panorama應用程序(因爲找不到Windows.Phone.Controls)?

但是,創建一個默認的項目後,我提出了這個當我嘗試編譯:

The tag 'Panorama' does not exist in XML namespace 'clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls'

什麼弄錯了我做?

編輯:我錯過了錯誤的一部分:

 
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Phone.Controls". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 
      For SearchPath "{TargetFrameworkDirectory}". 
      Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone\Microsoft.Phone.Controls.dll", but it didn't exist. 
      Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone\Microsoft.Phone.Controls.exe", but it didn't exist. 
      For SearchPath "{RawFileName}". 
      Considered treating "Microsoft.Phone.Controls" as a file name, but it didn't exist. 
      For SearchPath "Bin\Debug\". 
      Considered "Bin\Debug\Microsoft.Phone.Controls.dll", but it didn't exist. 
      Considered "Bin\Debug\Microsoft.Phone.Controls.exe", but it didn't exist. 

回答

2

在我看來,該SDK不知何故未能安裝某些必需的組件。我會建議先重新安裝SDK,然後看看從哪裏可以得到。

+0

這真的很奇怪。修復安裝做了伎倆。 – 2011-04-22 05:00:24

3

剛剛得到這個錯誤!在我的情況下,我手動添加了一些預先存在的XAML(其中有些是全景圖),這個項目沒有任何全景圖頁面。

基本上我所做的是添加一個新的「Windows Phone Panorama頁面」,這使VisualStudio包含了一些缺少的其他引用,現在該項目正在加載平滑。

+0

我剛剛建立了股票啓動項目。沒有爲我編輯的XAML。 – 2011-07-14 21:54:06

+0

這對我來說伎倆,謝謝! – 2013-06-29 21:03:57

相關問題