Bug 42545 - Numerous errors when creating new Xamarin.Forms Portable project
Summary: Numerous errors when creating new Xamarin.Forms Portable project
Status: REOPENED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: 4.2.0 (C8)
Assignee: Joaquin Jares
URL:
Depends on:
Blocks:
 
Reported: 2016-07-14 00:06 UTC by rjacobson
Modified: 2018-01-06 01:23 UTC (History)
8 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Screenshot of warnings/error messages. (141.40 KB, image/gif)
2016-07-14 00:06 UTC, rjacobson
Details
Designer.Logs from build & run of new Portable Xamarin Forms App (265.93 KB, application/x-zip-compressed)
2016-07-16 21:08 UTC, purplejayd2011
Details
Screenshots of the Error/Warning IDE0006 received and deployment Fail (500.51 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-07-18 18:31 UTC, purplejayd2011
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 42545 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:
Status:
REOPENED

Description rjacobson 2016-07-14 00:06:55 UTC
Created attachment 16659 [details]
Screenshot of warnings/error messages.

I'm an experienced C# developer, but new to Xamarin.  Whenever I create a new "Blank App (Xamarin.Forms Portbale)" project in Visual Studio, I'm greeted with a huge number of build warnings and errors.  These are shown in the attached screenshot.

I have tried reinstalling Visual Studio many times (including after several full reformats/reinstalls of Windows 10), but it has no effect.  I also tried installing Xamarin/Visual Studio on two other computers and encountered the same problems.

To reproduce, do the following:
1.  Reformat the hard drive and reinstall a clean copy of Windows 10 (with all updates).
2.  Install Visual Studio with Xamarin using either the Microsoft installer or the Xamarin installer.
3.  Once installed, update to the latest stable version of Xamarin using Tools:Options:Xamarin:Other.
4.  Next, update the Android packages using Tools:Android:Android SDK Manager.
3.  Create a new "Blank App (Xamarin.Forms Portbale)."

Once completed, you'll be greeted with perhaps thirteen error messages/warnings.  These include several instances of the following:
-- "CS:0103 The name 'InitializeComponent' does not exist in the current context."
-- "IDE0006 Error encountered when loading the project..."
-- "The XamlCTask failed unexpectedly"
-- "Unexpected errror: Please file a bug report.  Reason: System.IO.FileNotFoundException."

In addition, after cleaning/building/rebuilding the solution, I'll often encounter new errors.

This creates a terrible first impression to new users, as well as a real hassle for other users.  There are numerous posts on the Xamarin forums from other users who have the same problems, but with few solutions.

After spending hours and hours of research, I finally figured out how to fix each of these problems.  However, this was a complete waste of time and extraordinarily frustrating.  Altogether, I've spent the better part of a week attempting to get a working, bug-free installation of Xamarin.

My expectation is that when creating a new "Hello World" application, like the "Blank App" template, it should "just work" correctly off the bat.  Users shouldn't have to spend hours hunting down solutions for obscure problems.

Please, please fix this.
Comment 1 purplejayd2011 2016-07-16 21:05:27 UTC
I also am an experienced C# developer, but new to Xamarin. I am getting exact same issue as this (on Windows 7, VS2015).   I followed all the same steps outlined above , in addition to following teh steps for logs etc at https://github.com/dotnet/roslyn/wiki/Diagnosing-Project-System-Build-Errors

zip of logs attached.

Although I finally managed to get the new project to build without any errors, when trying to run it on recommended Android emulator(5554: AVD_GalaxyNexus_ToolsForApacheCordova (Android 4.4 API-19 ) it states "There were Deployment errors... " and will not run. However, no errors are listed.

NOTE: this *SEEMS* to be very recent - within past week. I started development  a few weeks ago (circa 24th June) and recall creating a blank "Hello Xamarin Forms "Portable app - (following instructions in https://developer.xamarin.com/guides/xamarin-forms/creating-mobile-apps-xamarin-forms/  ) and it built and ran without any issues.
Comment 2 purplejayd2011 2016-07-16 21:08:25 UTC
Created attachment 16697 [details]
Designer.Logs from build & run of new Portable Xamarin Forms App
Comment 3 purplejayd2011 2016-07-18 18:31:54 UTC
Created attachment 16709 [details]
Screenshots of the Error/Warning IDE0006 received and deployment Fail
Comment 4 Joaquin Jares 2016-08-17 16:31:58 UTC
This is now solved in master. Closing as resolved for verification.
Comment 6 rjacobson 2018-01-06 01:22:51 UTC
This problem has not yet been fixed.  This should be a test that is run for each new release or update of Xamarin.

To reproduce today:

1.  Create a fresh installation of Visual Studio 2017.

2.  Create a new "Cross-Platform App" using Xamarin.Forms in Visual Studio.

3.  Attempt to compile and debug the Android default app, as created.

Everything breaks.  Badly.  This is a terrible, terrible first introduction for people like me to Xamarin.  If nothing else, I expect that a "Hello World" app should run on the first attempt, not require hours of debugging.

If you use NuGet to update the packages, then you're in for a world of hurt.

I should add that I'm following the "Xamarin University" introduction to Xamarin.  It seems to be a year (or more) out of date and has no relationship to reality today.  Combined, these create a "facepalm" moment.
Comment 7 rjacobson 2018-01-06 01:23:40 UTC
Perhaps it was fixed before, but it's broken now.