Bug 59224 - Upgrading from 2.4.0-pre1 to pre2 sets xaml build action to None
Summary: Upgrading from 2.4.0-pre1 to pre2 sets xaml build action to None
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.4.0
Hardware: PC Windows
: --- critical
Target Milestone: 2.4.0
Assignee: Bugzilla
Depends on:
Reported: 2017-09-05 08:40 UTC by Anonymous
Modified: 2017-09-12 00:26 UTC (History)
4 users (show)

Tags: ac xaml netstandard buildaction fr
Is this bug a regression?: Yes
Last known good build: 2.4.0-pre1

repro project (10.27 KB, application/x-zip-compressed)
2017-09-08 22:23 UTC, Jimmy [MSFT]

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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Anonymous 2017-09-05 08:40:13 UTC
I upgraded Xamarin.Forms from to and got lots of errors along the lines of "App does not contain a definition for InitializeComponent" and "App.OnStart: No suitable method found to override". It turns out the upgrade had set the Build Action for all the XAML files to None. Changing back to Embedded Resource fixed the problems.
Comment 1 Anonymous 2017-09-05 08:41:15 UTC
Note that I experienced this on two separate projects on two separate machines.
Comment 2 Jimmy [MSFT] 2017-09-05 16:27:36 UTC
I'm trying to reproduce this, but I haven't been able to so far. Did you observe this with Visual Studio 2017 or Visual Studio for Mac? What type of project are the XAML files in: shared, PCL, or .netstandard library?

When providing the requested information, please set the report's status back to NEW otherwise we may close this issue after 30 days of no response. Thanks!
Comment 3 Anonymous 2017-09-05 17:10:01 UTC
VS 2017. Both PCL and .Net Standard 1.4.
Comment 4 Jimmy [MSFT] 2017-09-08 22:22:52 UTC
### Overview
A .netstandard library that contains xaml files will fail to build after being updated to Xamarin.Forms 2.4.0-pre2 because the Build Action for the xaml files is reset to None.

### Steps to Reproduce
1. Open the attached project in VS2017
2. Rebuild the project
3. Update the Xamarin.Forms package to 2.4.0-pre2
4. Rebuild the project

### Expected Results
The project will successfully rebuild both times.

### Actual Results
The project rebuilds the first time when it uses Forms 2.4.0-pre1. However after updating to -pre2 it no longer builds successfully until the Build Action for the xaml files is set back to EmbeddedResource.
Comment 5 Jimmy [MSFT] 2017-09-08 22:23:10 UTC
Created attachment 24662 [details]
repro project
Comment 6 Jimmy [MSFT] 2017-09-11 23:49:14 UTC
Should be fixed in 2.4.0-pre3. Thanks!
Comment 7 Samantha Houts [MSFT] 2017-09-12 00:26:53 UTC