开发者

Why can't Visual Studio 2010 compile the default Windows Phone Panorama app (because it can't find Windows.Phone.Controls)?

I just installed the Windows Phone developer tools, because I want to play with the phone and possibly publish some application(s).

However, after creating a default project, I'm presented this when I try to compile:

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

What mistake have I made?

EDIT: I missed part of the error:

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 开发者_StackOverflow社区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.


Just got this error! In my case I was manually adding some pre-existing XAML's (among them, some with panorama) to a project which didn't have any panorama page.

Basically what I did was add a new "Windows Phone Panorama Page", which made VisualStudio include some additional references that was missing, and now the project is loading smooth.


It appears to me that the SDK somehow failed to install some of the required components. I would recommend reinstalling the SDK first and see where you can get from there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜