C# 将Bing地图添加到页面时Windows应用商店应用程序崩溃

C# 将Bing地图添加到页面时Windows应用商店应用程序崩溃,c#,windows-8.1,bing-maps,win-universal-app,C#,Windows 8.1,Bing Maps,Win Universal App,我在我的VS 2013上创建了新的Universal app Hub模板,并根据本文介绍了如何将Bing地图添加到我的应用程序中: 我的xaml: <Page x:Name="pageRoot" x:Class="HubApp1.HubPage" DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}" xmlns="http://schemas.microsoft.com/winfx/2

我在我的VS 2013上创建了新的Universal app Hub模板,并根据本文介绍了如何将Bing地图添加到我的应用程序中:

我的xaml:

<Page
x:Name="pageRoot"
x:Class="HubApp1.HubPage"
DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:HubApp1"
xmlns:data="using:HubApp1.Data"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:bm="using:Bing.Maps"
mc:Ignorable="d">

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <bm:Map  x:Name="myMap" Credentials="MY_SHARD_KEY" ></bm:Map>
</Grid>
如果没有Bing地图控件,应用程序当然不会崩溃。。。
有人知道问题出在哪里吗?我只想做一些简单的事情。

Bing地图控件只在Windows 8/8.1应用程序中有效。要在通用应用程序中使用地图,请查看以下博文:

要检查的另一件事是,您已在configuration manager中将活动解决方案平台从任何CPU更改为x86或x64。Bing MAP控件使用C++运行时,这需要您针对特定平台构建项目,而不是使用任何CPU设置。您可以在此处找到有关此的文档:

Unhandled exception at 0x76ECB152 (combase.dll) in HubApp1.Windows.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x002ED480, 0x00000002).