Intermittent Missing Resources Xamarin - visual-studio

I have several solutions where I would say about 20% of the time I get a resource not found exception like the following during run-time.
android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f080007
Usually, I can temporarily fix the issue by cleaning the solution and restarting visual studio and then rebuilding. The resource isn't always the same between builds. Sometimes it is a textview other times it is a drawable etc.
Note, the projects always builds fine, the error is always an exception thrown at runtime.
Has anyone else experienced something like this? Any advise on how I can debug the issue? I've done things like make sure resources don't contain forbidden characters etc.
Below is an abbreviated copy of the version information in my Help -> About Microsoft Visual studio window.
Microsoft Visual Studio Community 2017
Version 15.6.7
VisualStudio.15.Release/15.6.7+27428.2043
Microsoft .NET Framework
Version 4.7.03056
Installed Version: Community
...
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin 4.9.0.753 (f0f46392f)
Xamarin Designer 4.10.96 (a702a9ceb)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin.Android SDK 8.2.0.16 (HEAD/a78295902)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 11.9.1.24 (f62de47)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Thanks!

Related

How to check Mono Version in Visual Studio 2017 in Windows 10?

I want to know which Mono version my project uses. How can I check it?
In my project I have Mono.Android DLL. I have right clicked on it and review property. It says Runtime Version: 4.0.3. If I go to location of that DLL, I am getting this location: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v6.0\Mono.Android.dll
I am confused with what is version of Mono. And what is Mono.Android. Please help me
Following information I got from Help --> About Visual Studio
Microsoft Visual Studio Enterprise 2017
Version 15.5.4
VisualStudio.15.Release/15.5.4+27130.2024
Microsoft .NET Framework
Version 4.7.03056
Installed Version: Enterprise
Visual Basic 2017
Microsoft Visual Basic 2017
Visual C# 2017
Microsoft Visual C# 2017
Mono Debugging for Visual Studio 4.8.4-pre (3fe64e3)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 4.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
Visual Studio Tools for Universal Windows Apps 15.0.27130.2020
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Xamarin 4.8.0.757 (7f9ec2a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 4.8.188 (c5813fa34)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin.Android SDK 8.1.3.0 (HEAD/ef47226b7)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 11.6.1.2 (6857dfc)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
You don't have Mono android integrated with visual studio so you can't find it from
Help --> About Visual Studio.
There is no more monoDoid now it becomes Xamarin.Android.
Xamarin.Android applications run within the Mono execution environment which it takes with it onto the device. Thus, an application package is an obvious way in which we can get this done. So mono itself is xamarin.android. Here you are using mono android version v6.0 which you have targeted for your application & Runtime Version: 4.0.3 is your version of .NET runtime assembly.
Mono- The Mono framework is an open source implementation of Microsoft’s .NET Framework based on the open standards for the C# language and the Common Language Runtime.
The Mono project has been in active development for over a decade and is used - behind the scenes - in many products. Developer used to use it with Visual Studio 2010.
For more information visit this & this
Hope it help you.

Error: this template attempted to load component assembly 'Microsoft.VisualStudio.Universal.TemplateWizards, Version=15.0.0.0

I'm using Visual Studio Community 2017 Version 15.7.1 on Windows 10 Home Version 10.0.16299 32-bit, Windows SDK Version 10.0.17134.12 and C++/WinRT Version 1.0.180505.2. When I try to create a new project using any of C++/WinRT templates, I'm getting this error message:
Error: this template attempted to load component assembly
'Microsoft.VisualStudio.Universal.TemplateWizards, Version=15.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. For more
information on this problem and how to enable this template,
please see documentation on Customizing Project Templates.
Is there an easy fix to this problem?
This error was caused by missing UWP SDK. My first installation of Visual Studio was configured for Desktop development with C++ workfload only, so UWP development workload components were missing. I added UWP development workload using Visual Studio Installer.
This error comes due to absence of UWP tools. For Visual Studio 2019, you simply have to go to Extensions>Manage Extensions>Online and search for "UWP Essentials" then download it for free. Close all Visual Studio windows and then when you open it again, the problem should be solved.
The easiest way to fix this is to install the whole UWP Essentials package. It contains a lot, but it gives you everything to fix the issue. Go to Tools > Extensions and Updates > Online and search for "UWP Essentials", and use the Visual Studio Installer to get it.

Xamarin Profiler not visible in Visual Studio 2017 Enterprise

So, The question is pretty much self explanatory. I can not see Xamarin Profiler in Analyze menu of Visual Studio. Its Enterprise version of 2017. The profile is installed and I can see it in Start Menu and can open it from there.
my problem is exactly like yours;
Xamarin Profiler was available before last week in my visual studio enterprise 2017, and suddenly removed and bundle assembly to native code in android option is disappeared too.
until now I can't find its reason and a solution
do you find any solution?

Xamarin class XAM110 projects MyTunes.Droid and MyTunes.iOS won't load

I am in the trial of Xamarin University trying to decide if it is worth joining. But I keep running into roadblocks with the self-guided classes. Right now my issue is that in the XAM110 class (Intro to Cross-Platform Development), Visual Studio cannot load the MyTunes.Droid or MyTunes.iOS projects for the MyTunes solution I downloaded from the class materials. The projects indicate "needs migration" in Solution Explorer, but when I try to reload the project, the error says "the project types may not be installed or this version of Visual Studio may not support them". I am using VS Enterprise 2017 Version 15.5.5, Xamarin 4.8.760, Xamarin.Android SDK 8.1.5.0, Xamarin.iOS 11.6.1.4. Any help is appreciated.
I fixed this problem by uninstalling and reinstalling Visual Studio 2017.

Visual Studio 2017 - Toolbox not loaded and hanging

I have just installed Visual Studio 2017 in my Windows 10.
I got error in initializing the Toolbox and it keep hanging.
Is there something I can do with?
I have launched the VS 2017 with Administrator, but this doesn't resolved the issue.
I had the same issue. I uninstalled Azure stuff and Clang/C2 and Toolset for Visual 2015.3 v140 and Xamarin stuff and added Apache Ant. After that it worked. So some of the above seams to resolve the issue. I will not do further investigation, because for me it is OK without that stuff.
Had the same problem. I did have Xamarin installed but not Android SDK, because I had it already installed for various other tools.
Turns out this is caused by Xamarin trying to access Android SDK, which isnt there. Solution seems to be to either remove Xamarin or install Android SDK, according to development community forum.
Unfortunatly, installing Xamarin and going into Xamarin/Android Settings to point to existing Android SDK (without it) also seems to hang VS2017.
HOWEVER...
If you want to keep Xamarin and use your own Android SDK/NDK, what you can do is:
Lauch Visual Studio 2017 Installer
Install Xamarin and Android SDK (dont need to install NDK as well)
Launch Visual Studio 2017
Go into Tools / Options / Xamarin / Android Settings (It wont hang
now)
Point to your existing Andoid SDK / NDK and Java runtime you want to
use
Close VS2017
Go back to Visual Studio Installer
Uninstall Android SDK
Before that I tried to define an ANDROID_HOME environment variable and tried to set the paths in registry, neither of those helped. This fixed the problem for me.
I tried all the voodoo solutions, removed every extension (xamarin included) and every package except the core .net and C# VS, which I updated to the latest version available v15.9.30. Same problem.
The solution for me was to uninstall an office plugin/tool from a previous visual studio.
The problem app was "Microsoft Visual Studio 2010 Tools For Office Runtime (x64)". After I uninstalled it, the problem was gone.

Resources