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

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.

Related

Intermittent Missing Resources Xamarin

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!

Could not load type Microsoft.Build.Framework.IProjectElement in Visual Studio

Until recently everything worked fine, but I installed Visual Studio (15.6.3) Enterprise on top of my Visual Studio Community (15.5.X). This caused problems with existing projects (specifically with .shproj files), so I've slowly uninstalled and taken more and more drastic steps. Most recently I've:
Uninstalled Visual Studio Community and Enterprise
Deleted all files from AppData/Local/Microsoft/VisualStudio and AppData/Roaming/Microsoft/VisualStudio
Restarted the computer
Reinstalled Visual Studio 2017 (just community since that was working fine) with the following options checked:
.NET desktop development
Universal Windows Platform development
Mobile development with .NET
Now if I try to make a Console App (.NET Framework), I get a popup after clicking the OK to create the new project:
Microsoft Visual Studio Could not load type
'Microsoft.Build.Framework.IProjectElement' from assembly
'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.
I'm unfortunately dead in the water until this is solved. Any help would be much appreciated as I'm about out of ideas.
The error message was slightly different (Microsoft.Build.Framework.IProjectElement vs Microsoft.Build.Framework.SdkReference) but the solution posted here solved my problem too:
Could not load type 'Microsoft.Build.Framework.SdkReference' on project open in VS 2017 U1 (15.3)

Visual Studio 2015 hangs when building Droid project of Xamarin.Forms solution

I am a newbie in Android. I started to learn Xamarin Forms few days ago. I created a new Project under Cross Platform -> Blank App(Xamarin Forms Portable). Still I have not written any code by my self, but every time when I build the Droid Project, it hangs the Visual Studio (Please see the picture below). Please advise me.
I want to share my experience,
I have a Xamarin Forms project on Visual Studio 2017 Professional edition.
After a few days, I have installed an update of Visual Studio and building the project became impossible.
At the end of a long search, I realised that it was trying to download a nuget package. And maybe due to a temporary problem, downloading the package was too slow (Tried to download the package from nugets.org directly). And as there is no explication, I had the impression that Visual Studio was hanging during the build.
I searched the package and installed on all projects in my solution, it took 45 minuts but at the end everything was ok.

Install Xamarin on Visual Studio 2015 with Xamarin on Visual Studio 2013 already installed

I have Xamarin installed on the Visual Studio 2013 on Windows Operating System. It works fine.
There is Xamarin tools in VS2013 as follows:
My problem is as follows:
I have recently installed Visual Studio 2015 on my desktop on Windows operating system. I thought when I opened the VS2015, I expected to see the Xamarin in it, but it does not. Then I installed the Xamarin again, and again and again, but still Xamarin does not show up in VS2015.
I wonder what is wrong? What am I missing?
By the way, I still have VS2013 on my desktop.
No Xamarin tools in VS 2015 as follows:
I even tried the following approach, still no luck.
Control Panel -> Programs -> Programs and Features Choose Xamarin
Click Change -> Next -> Click the desired drop down for each items in the tree view and select "Will be installed on local hard drive."
Click Next
I am even getting the following screen when installation is completed, but still I could not able to see Xamarin in VS2015.
I have installed Xamarin in my Visual Studio 2015 two days ago and it showing Xamarin under Tools. Below I have described the approach which I have followed to install Xamarin in Visual Studio 2015.
Go to Contol Panel >> Program Features >> Visual Studio
2015 >> Change>> Modify
1. Select C#/.Net(Xamarin) under Cross Platform Mobile Development
2. Check if these three red marked items are checked or not.
3. And then press update.It will download all the required packages to run Xamarin on VS 2015.Hope it helps you!!
I recently had horrendous problems trying to install Xamarin on VS2015 + Win10. (I don't have any other VS versions installed.) Even a full install and reinstall left huge holes in the installation. I tried repeatedly and each time the whole dev environment seemed to get itself in a different unusable state.
The fix for me, which is probably hitting a nut with a sledgehammer, was to:
Uninstall Xamarin (via Control Panel|Uninstall).
Uninstall Visual Studio (via Control Panel|Uninstall).
Follow Xamarin's manual uninstallation procedures Full Xamarin Uninstall.
Perform full reinstall of Visual Studio, being sure to tick the boxes shown in the answer by Parth Patel above.
This resulted in a faultless, fully functioning Xamarin environment for me. Overkill, maybe, but worth a go if all else fails.
Here is the solution:
I have deleted all the existing versions of visual studio ( 2010, 2012, 2013) except Visual Studio 2015 and then installed the Xamarin, and then I could able to see Xamarin on Visual Studio 2015.
It is not required to delete previous versions of VS. I have Xamarin Studio, VS 2013 and now VS 2015 and working perfectly. I moved to VS 2015 due to recent purchase of Xamarin by MS and that VS 2015 has Xamarin included.
I believe the issue with this question is was that your VS 2015 install did not include the add ins as pointed out in another answer in this question.
After the VS 2015 install -the only caveat was projects created initially in Xaramin Studio and then Opened in VS 2015 to needed to have the build configuration in the project tweaked. If not you could not get the project to build and then be deployed to an emulator or device for debug testing.
We have a few troubleshooting steps on our Knowledge Base that you can find here:
https://kb.xamarin.com/customer/en/portal/articles/1643349-missing-visual-studio-extensions-after-installation
Note: Some of these steps have older versions listed in the respective paths. You should use the latest version number available.
Before any install or uninstall actions. Try open some sample Xamarin project, in most cases during opening project in VS 15, it will show you, what needs to be installed or what is missing / corrupted.
Xamarin samples
I had some problems with my emulator best way to fix the problems is to uninstall everything (emulators, android sdk, vs, xamarin) and reinstall it.
It is also important to delete other or older versions of visual studio. Then you should probably see you options.
First try to uninstall all the other versions of Visual Studio (VS) 2013 in this case. Then try to reinstall Xamarin.
Visual Studio 2015 is little bit different from 2013 version, I am also using xamarin on visual studio 2015. But that is not listed under tools menu like 2013.
Maybe developers had changed that, you can go to "start a new project"(just like you start new app development), there you can find xamarin/android projects list, there you can start new android projects.
This is strange, I did not have any problem with Xamarin & VS 2015 (community).
You said,
I will see the Xamarin in it
Did you try to create a project or/and add your account in the new VS Installation ?

Will visual studio 2015 projects and solutions be backward compatible with 2013?

Now that Visual Studio 2015 RC is out, has anyone installed it and opened Visual Studio 2013 projects/solutions?
Does it ask the files to be changed?
If yes, are the changes it makes backward compatible?
Take a look at the Porting, Migrating, and Upgrading Visual Studio Projects article for Visual Studio 2015. All of the various caveats are described there.
Not all types of project are supported. I tried the following 4 project types:
Vb.net Class project, OK.
Vb.net Web Services project, OK.
Cordova JS project, not OK, need to migrate manually, by moving the sources from root directory to the www directory and install all API again.
C#.net winform project, OK.
Yes, though you sometimes will have to change the version (single number) in .sln file, no other differences found yet.
We resolved this by typically excluding this file from check in and only check it in when there really was a change (added project, ...) - and then to fix the version before checking in. (Different developer machines with different versions of VS.)
See question Visual Studio 2015 solutions backwards compatibility with Visual Studio 2013 and answer https://stackoverflow.com/a/31540590/586754.
(Assuming you are having basic projects that are supported by both versions, like C# and .net framework that is supported by lower version VS.)

Resources