.net WP8.1/Win10 UWP: Namespace for MapControl not found in Visual Studio Designer - visual-studio-2013

Edit: the described issue below occurs also in a Win 10 UWP application (VS2015, Win10) when using the MapControl.
I have a weird problem using the MapControl in a Windows Phone 8.1 (universal app) application. After adding the control to a page, Visual Studio says The name "MapControl" does not exist in the namespace "using:Windows.UI.Xaml.Controls.Maps". Building the app works, I can deploy it to the phone and the map is shown and everything is fine - but I cannot use the Designer for this page any longer since it claims that error.
The problem occured in a bigger project originally started in VS2013 (update 4) on Windows 8.1. My first thought was that my VS-installation was kind of broken. But also after a clean new installation of Windows 10 (10240) and VS2015 RTM the problem occured. My steps to reproduce are quite simple:
Create a new project from template "Blank App (Universal Windows 8.1)"
Open the MainPage.xaml of the WindowsPhone subproject
Double click the MapControl in the toolbox
Note that the MapControl is added to the Grid in xaml and it is shown in side-by-side design view. Everything seems to be ok.
I can now add more controls to the page just by clicking the toolbox. I can modify the controls on the page with the mouse in the designer (e.g. rearrange them) and I can change their properties by the properties pane. Everything is still ok.
But when I either close and reopen that page (or the whole project) in the designer or when I start to edit the xaml directly with the keyboard, the designer fails and claims the error described above.
What's the problem here? How can I make Visual Studio designer to work with pages with MapControls again? First I thought of a bug in VS2013 - but that simple to reproduce, not fixed in VS2015 and no information about it on the internet? What did I wrong?

There is a bug on Visual Studio Tools for Universal Windows Apps 1.0 causing this issue with the map, installing this update should fix the issue Update
Procedure to correctly use the map sdk
Windows 8.1
Go to Tools-> extension and update -> install Bing Map SDK.
Right click on the project->Add reference->Windows->Extensions->Bing maps
Set configuration to x86 (Configuration Properties -> Configuration)
Add the map reference to your page using xmlns:maps="using:Bing.Maps"
Adding this line to your xaml <maps:Map />
and now you are good to go
Windows Phone and Windows 10 UAP
Add this reference in your xaml
xmlns:maps="using:Windows.UI.Xaml.Controls.Maps"
and then add this line to your xaml
<maps:MapControl />

Set configuration to x86 instead of "Any CPU". For prioritising fix upvote at https://connect.microsoft.com/VisualStudio/feedback/details/1659249/visual-studio-2015-rtm-uwp-the-name-mapcontrol-does-not-exist-in-the-namespace-using-windows-ui-xaml-controls-maps

Make the correct map library reference
xmlns:Maps="clr-namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"
Instead of
xmlns:Maps="using:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"

Related

XAML Edit & Continue broken on VS2017 v15.7.1?

I've installed VS15.7.1 Create a dummy UWP project targeting Build 10240.
With this configuration:
Execute the app.
Modify the text inside a button in the XAMl in VS.
Nothing gets reflect in the running app.
This used to work before. It's any kind of hidden setting or it's broken?
I I target version 1803 as in the photo XAML Edit & Continue works, but In 10240 it's broken:
This was finally a bug in Visual Studio that is going to be fixed soon in VS 2018 preview 3: https://developercommunity.visualstudio.com/content/problem/256287/xaml-edit-continue-broken-in-uwp-10240.html

Visual Studio 2017 Xamarin UWP break, unable to load "sqlite3"

When I launch UWP project, it crashes and I'm getting errors like these.
And this error occurs mostly when its on debugging mode.
Soo.. first idea for fixing this was upgrading/downgrading nuggets, but that didn't help me, also I have these nuggets included for UWP:
Microsoft.NETCore.UniversalWindowsPlatform
SQLite.Net-PCL
System.Data.SQLite
Xamarin.Forms
XLabs.Forms
etc other(that dosent matter on this exception)
I also looked other posts for solving this, like adding SQLite extension, but I didnt find the extension from Universal Windows->Extensions.
Im pretty stuck with this problem, I think its probably a problem with nuggets
You were fairly close. Go to Tools > Extensions and Updates. Click the Online tab in the left hand menu.
Search for SQLite and download SQLite for Universal Windows Platform.
Now go back to the Extensions window, as you showed above, and tick the SQLite for Universal Windows Platform. Ensure you keep the Visual C++ 2015 Runtime ticked, you need this as well.

Visual Studio For Mac Designer Error

I have downloaded VS For Mac Preview and created a new Xamarin Forms IOS/Android Solution using the portable library. When i try and load the XAML designer though to view the startup page I get the error "Invalid XAML : default constructor not found for Xamarin.Forms.Applicaton". I have not made any changes to the project code generated by VS For Mac and the only thing I did was to build the Android project as this is required before the designer can be opened. I also had to download the latest versions of the Android SDK via the SDK Manager.
Does anyone have any idea what is wrong
Thanks
Steve
Firstly, there are two preview modes, one for iOS and one for Android - if you can't see both tabs, drag the frame over a bit. I can't currently get the Android preview to work right even though it builds, but for iOS to work it looks like you simply need to update the Xamarin.Forms package. Go to the 'Project' menu and select 'Update NuGet Packages.' Then, restart Visual Studio for Mac and it should be working. It is very slow to load, however. I had to rebuild my project and select 'Update NuGet Packages' a second time before it actually showed up.
I'm still trying to figure out why Android preview does not work.

Unable to open axml with design view with Visual Studio 2015

I created a new android layout file using visual studio 2015 and am unable to view with the designer that is built in to visual studio.
After selecting 'design' tab, I just see a waiting icon in the center of the view and it never finishes. After a while, i have to close the design tab and open in xml editor. The form is valid as it runs fine in emulator.
ideas?
I was able to resolve after uninstalling all platforms using Android SDK Manager and re-installing each platform 1 by 1. If there is an issue with the installation nothing will be installed (note: watch the logs for errors and review after each platform is installed)
Initially, I did have to manually download SDK Manager and copy the tools folder to my existing installation. I am not sure why my Tools folder was empty but after performing this step I could again run SDK Manager.

Making controls deployed in a NuGet package to show in Visual Studio Toolbox

Someone asked about getting the WinRT XAML Toolkit controls to show up in Visual Studio Toolbox. I can see that they do show up when I look at the sample project that uses the source code version of the WinRT XAML Toolkit and I can find them in Blend in an app project that uses NuGet-packaged version of the Toolkit - just by searching for the controls by name, but they don't automatically show up in VS Toolbox somehow. I saw in Tim Heuer's article that you can make them show up in the Toolbox if you do a VSIX deployment, but the Toolkit doesn't support that option right now.
Is it possible to get it to work with NuGet or are using the source code or building Extension SDK the only options?
I think the possible way to do this would be to allow package manager to take additional parameters which would then add them to toolbox
If the default project templates reset the toolbox items each time, this might work great otherwise we will see versioning related issues in no time.

Resources