Bug 27325 - Error: Unknown MSBuild failure. Please try building the project again
Summary: Error: Unknown MSBuild failure. Please try building the project again
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.6.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-23 16:47 UTC by dj_technohead
Modified: 2015-02-23 17:45 UTC (History)
2 users (show)

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

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:
Status:
RESOLVED FIXED

Description dj_technohead 2015-02-23 16:47:51 UTC
After updating a solution to use the new unified API, I'm getting the error "Error: Unknown MSBuild failure. Please try building the project again" when trying to build the solution for the physical device. Switching to target the simulator, the build works fine.

After some trial and error, I found that by commenting out the line: 

[Register ("UIApplicationMain")]

that decorates the UIApplicationMain class, I can now compile and deploy to the physical device, but of course it refuses to run.
Comment 1 dj_technohead 2015-02-23 16:49:02 UTC
Here's my Xamarin details:

=== Xamarin Studio ===

Version 5.7.1 (build 17)
Installation UUID: bfa92f08-b54c-43ca-baac-4c06dda9ee77
Runtime:
	Mono 3.10.0 ((detached/47db868)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000019

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.1.26 (Business Edition)
Hash: 98ee412
Branch: 
Build date: 2015-02-11 04:37:05-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/dj_technohead/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

=== Operating System ===

Mac OS X 10.10.2
Darwin Denniss-Air-2 14.1.0 Darwin Kernel Version 14.1.0
    Mon Dec 22 23:10:38 PST 2014
    root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
Comment 2 dj_technohead 2015-02-23 17:23:03 UTC
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -gdwarf-2 -std=c99 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.1.26/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -Qunused-arguments -miphoneos-version-min=7.0 -arch arm64 -c -DDEBUG  -o /Users/dj_technohead/Projects/HighSeas/Specialus/Mobile/Specialus.Touch/obj/iPhone/Debug/mtouch-cache/registrar.arm64.o -Wno-receiver-forward-class -x objective-c /Users/dj_technohead/Projects/HighSeas/Specialus/Mobile/Specialus.Touch/obj/iPhone/Debug/mtouch-cache/64/registrar.m
		/Users/dj_technohead/Projects/HighSeas/Specialus/Mobile/Specialus.Touch/obj/iPhone/Debug/mtouch-cache/64/registrar.m:1922:12: error: redefinition of 'UIApplicationMain' as different kind of symbol
		@interface UIApplicationMain : UIApplication {
Comment 3 dj_technohead 2015-02-23 17:45:32 UTC
Oh, found the problem, related to an old bug report I had filed a long time ago (https://bugzilla.xamarin.com/show_bug.cgi?id=19618)