Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy can I not reference Bing Maps in my app?
    primarykey
    data
    text
    <p>I tried to add a Reference to Bing Maps in my app by right-clicking on <em>References | Add References | Windows | Extensions | Bing Maps for C#...</em>, but selecting "OK" does nothing - the Reference is not added.</p> <p>I then tried adding it via <em>Tools | Extensions and Updates</em>, but when I installed the latest version (with today's date - 11/5/2012), I then got:</p> <pre><code>Successfully installed 'BingMapAppSDK 1.0.1011.1716'. Successfully uninstalled 'BingMapAppSDK 1.0.1011.1716'. Install failed. Rolling back... Could not install package 'BingMapAppSDK 1.0.1011.1716'. You are trying to install this package into a project that targets '.NETCore,Version=v4.5', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author. </code></pre> <p>Now the button there (at <em>Tools | Extensions and Updates | Bing Maps SDK for C#...</em> says "Uninstall" so it is apparently installed, but why can I not add the Reference to my project?</p> <h2>UPDATE</h2> <p>It's not just Bing Maps that won't let itself be added to my project's References; when I try to add "Microsoft Visual C++ Runtime Package," it also will not be added; there's no err msg when I select it, it simply doesn't get added...</p> <p>I have another project which has "Bing Maps for C#..." installed as a Reference. Why that one would work and the other one not is both a conundrum and an irritation.</p> <p>The bizarre thing is that, according to <em>Extensions and Updates Installed | SDKs</em>, in the working project the only Bing Maps SDK installed is the one for JavaScript... and yet my project does have a Reference to "Bing Maps for CE, C++, or VB"...???</p> <p>Yet if I go to <em>Extensions and Updates | Online | Visual Studio Gallery</em> and search for "bing maps" the search results contains "Bing Maps SDK for Windows Store apps" with a green check, indicating it is installed.</p> <p>Could it be my project's configuration? The project that works is set for Debug, x86. The one that doesn't work is set to Debug, Any CPU...???</p> <p>And if I'm doing something wrong, why is the "Filtered to: SDKs applicable to displaying (among other things) "Bing Maps for C#, C++, or VB"? </p> <p>IOW, it's teasing me that it's available, but won't allow it to be added...argghhhh!!!</p> <h2>UPDATE 2</h2> <p>Maybe this could be a clue to my problem: In <em>Tools | Extensions and Updates</em>, Bing Maps SDK for Windows Store apps appears in the "Tools" category as opposed to the SKDKs category (although Bing Maps SDK for JavaScript) is in the SDKs category...</p> <h2>UPDATE 3</h2> <p>Based on Mayank's suggestion, I tried to browse to and add the .dll</p> <p>That not only didn't work, but also gave me an err msg:</p> <p><em>"A reference to C:\Users\Clay\AppData\Local\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\Bing.Maps.Xaml\1.0\DesignTime\CommonConfiguration\x86\Bing.Maps.Design.dll' could not be added. The project targets '.NETCore' while the file reference targets .NETFramework'. This is not a supported scenario.</em></p> <p>If this is truly the problem, how do I switch from .NETCore to .NETFramework? I'm certain I did not explicitly choose .NETCore at any time for this project...</p> <h2>UPDATE 4</h2> <p>Elsewhere somebody suggested I compare the .csproj files of an app that does work with the Bing Maps and the one that doesn't. Here's is what I have come up with:</p> <p>I noticed that the app that IS working with Bing Maps has this in the .csproj file, whereas the other one doesn't:</p> <pre><code>&lt;Compile Include="DataModel\SampleDataSource.cs" /&gt; &lt;Compile Include="Common\BindableBase.cs" /&gt; &lt;Compile Include="Common\BooleanToVisibilityConverter.cs" /&gt; &lt;Compile Include="Common\BooleanNegationConverter.cs" /&gt; &lt;Compile Include="Common\LayoutAwarePage.cs" /&gt; &lt;Compile Include="Common\RichTextColumns.cs" /&gt; &lt;Compile Include="Common\SuspensionManager.cs" /&gt; &lt;Compile Include="SQLite.cs" /&gt; &lt;Compile Include="SQLiteAsync.cs" /&gt; &lt;Compile Include="ViewModel\StorageUtils.cs" /&gt; &lt;Compile Include="View\SectionN.xaml.cs"&gt; &lt;DependentUpon&gt;SectionN.xaml&lt;/DependentUpon&gt; &lt;/Compile&gt; </code></pre> <p>...although curious (why does one include all of those files, and the other doesn't?), I don't see why this would be a problem.</p> <p>Also, the working app contains this:</p> <pre><code>&lt;/PropertyGroup&gt; &lt;PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'TSLsARM| AnyCPU'"&gt; &lt;DebugSymbols&gt;true&lt;/DebugSymbols&gt; &lt;OutputPath&gt;bin\TSLsARM\&lt;/OutputPath&gt; &lt;DefineConstants&gt;DEBUG;TRACE;NETFX_CORE&lt;/DefineConstants&gt; . . . </code></pre> <h2>UPDATE 5</h2> <p>This is in response to JuStDaN:</p> <p>Both solutions (the one that has the Bing Maps for Windows Store apps </p> <p>reference, and the one that won't accept it) references the ".NET for </p> <p>Windows Store apps" SDK, with these property settings:</p> <pre><code>Identity = .NETCore,Version=v4.5; Version=4.5.0.0; Path=C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\ </code></pre> <p>Both have Application.Target framework=blank; Output: Windows Store app Application.Build.Configuration=Active (Debug); Platform: Active (x86)</p> <p>I have at least a couple of other solutions that won't accept new references, either. It's as if the Bing Maps for Windows Store reference installed once, and then refused to ever again...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload