Bug 59833 - Xamarin.Forms 2.4.280 Unable to build the project
Summary: Xamarin.Forms 2.4.280 Unable to build the project
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS (show other bugs)
Version: 2.4.0
Hardware: Macintosh Mac OS
: --- blocker
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-09-28 21:03 UTC by nico.haslberger
Modified: 2018-01-03 20:27 UTC (History)
6 users (show)

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


Description nico.haslberger 2017-09-28 21:03:49 UTC
# Steps to reproduce
I just updated the xamarin.Forms library to 2.4.280 and I was unable to build my project.
I´m using Visual Studio for Mac 7.1.5 (build 2)

# Expected behavior
The project should build normally

# Actual behavior
I get an error in the error list and I´m unable to compile

# Supplemental info (logs, images, videos)
Error: /Users/n.haslberger/Documents/Projects/Immotech OG/Immotech iOS App/CommonBase/CommonBase.csproj: ../packages/Xamarin.Forms. Project file could not be imported, it was being imported by /Users/n.haslberger/Documents/Projects/Immotech OG/Immotech iOS App/CommonBase/CommonBase.csproj: /Users/n.haslberger/Documents/Projects/Immotech OG/Immotech iOS App/packages/Xamarin.Forms. Project file could not be imported, it was being imported by /Users/n.haslberger/Documents/Projects/Immotech OG/Immotech iOS App/packages/Xamarin.Forms. The attribute "Generator" in element <EmbeddedResource> is unrecognized. (CommonBase)

The content of the Xamarin.Forms.DefaultItems.props file:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

	<ItemGroup Condition="'$(EnableDefaultItems)'=='True' And '$(EnableDefaultXamlItems)'=='True' And '$(EnableDefaultEmbeddedResourceItems)'=='True'">
		<EmbeddedResource Include="**\*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" SubType="Designer" Generator="MSBuild:UpdateDesignTimeXaml" />


Well it seems that the attributes SubType and Generator are not supported by VS or something like that.
Comment 1 Paul DiPietro [MSFT] 2017-10-03 15:50:05 UTC
With a fresh project using, I can get it to build on VSMac. Are all the package versions aligned, and did a complete clean/rebuild and deletion of the bin/obj folders help? Adding in a NETStandard 1.4 project with the Forms package lets it compile as well. I think we had some issues with building that could have possibly been resolved, but I want to double check your situation.
Comment 2 Sridhar 2017-10-16 19:59:21 UTC
I see the similar issue , Started with a brand new forms based app and when trying to compile it is giving this error 

"Error:  /iOS/TestFormsApp.iOS.csproj: ../packages/Xamarin.Forms. Project file could not be imported, it was being imported by  /iOS/TestFormsApp.iOS.csproj:  /packages/Xamarin.Forms. Project file could not be imported, it was being imported by  /packages/Xamarin.Forms. The attribute "SubType" in element <EmbeddedResource> is unrecognized. (TestFormsApp.iOS)"
Comment 3 Sridhar 2017-10-16 20:01:11 UTC
This is my VS details.

=== Visual Studio Community 2017 for Mac ===

Version 7.2 (build 636)
Installation UUID: 72dc2447-141e-460b-b411-b501a7f1d10a
	Mono (2017-06/71277e78f6e) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504000201

=== NuGet ===


=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
SDK: /usr/local/share/dotnet/sdk/1.0.3/Sdks
SDK Version: 1.0.3
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.0 (13247)
Build 9A235

=== Xamarin.Mac ===

Version: (Visual Studio Community)

=== Xamarin.iOS ===

Version: (Visual Studio Community)
Hash: 2f8bbec0
Branch: d15-4-xi
Build date: 2017-10-05 20:56:05-0400

=== Xamarin.Android ===

Version: (Visual Studio Community)
Android SDK: /Users/smuthin3/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		6.0   (API level 23)
		7.1   (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 26.0.0
SDK Build Tools Version: 25.0.3

Java SDK: /usr
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Android Designer EPL code available here:

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 702000636
Git revision: b349c8fc0c2e1aab0179917d56eed75eb3a03337
Build date: 2017-10-06 15:20:04-04
Xamarin addins: a8da992c78f7eb65b3cdb3f951c34a30337cab35
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 4 iunknown21 2017-11-02 22:04:34 UTC
Is there a fix for this?  I'm seeing the same error as Comment #2.

I've tried cleaning the project, deleting the bin folders, removing and re-adding the Xamarin.Forms package.

I don't see any <SubType> in the .csproj file.

Using VSMac and Xamarin.Forms Version

any ideas on how I can get past this?
Comment 5 Paul DiPietro [MSFT] 2017-12-04 16:14:36 UTC
As there have been no further reports, we do not believe this is an issue as of the latest 2.5.0 stable version of Forms. Please reopen with a reproduction project if the issue is still being experienced on new projects while also running the latest VS.

Guidelines for creating reproductions are available at:
Comment 6 nico.haslberger 2017-12-04 16:21:56 UTC
Nope, sorry, for the newest 2.5 packages the issue still exists.
VS 2017 for mac is up to date from the stable branch.
Comment 7 Paul DiPietro [MSFT] 2017-12-04 16:29:53 UTC
Please upload a reproduction per requested when able. Thanks.
Comment 8 Scott Spiller 2017-12-06 23:52:44 UTC
I'm getting this error as well.  I'm using visual studio for mac enterprise(version 7.3 build 797).  using xamarin.forms version

../packages/Xamarin.Forms. Project file could not be imported, it was being imported by  /packages/Xamarin.Forms.
Comment 9 Paul DiPietro [MSFT] 2018-01-03 20:27:45 UTC
We cannot reproduce this nor have we received a reproduction, and as such this will be closed. Please open a new issue on GitHub (https://github.com/xamarin/Xamarin.Forms/issues) with a reproduction project if this still occurs on the latest stable release of Forms/VS.

Note You need to log in before you can comment on or make changes to this bug.