Bug 24673 - "Unexpected error - please file a bug report" thrown when attempting to build project; same project builds correctly in Xamarin Studio (Mac)
Summary: "Unexpected error - please file a bug report" thrown when attempting to build...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 3.7
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Kent Green [MSFT]
URL:
: 25351 ()
Depends on:
Blocks:
 
Reported: 2014-11-19 13:46 UTC by Kent Green [MSFT]
Modified: 2016-12-22 17:38 UTC (History)
7 users (show)

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


Attachments
Sample to reproduce the bug & Log folder (2.84 MB, application/zip)
2014-11-19 13:46 UTC, Kent Green [MSFT]
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 on Developer Community 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 Kent Green [MSFT] 2014-11-19 13:46:30 UTC
Created attachment 8807 [details]
Sample to reproduce the bug & Log folder

---Overview---
From this desk case:
https://xamarin.desk.com/agent/case/104722

Customer sent in project that builds in Xamarin Studio, but not in Visual Studio. When opening the file in Visual Studio, a warning is thrown:
Warning	1	Unexpected error - Please file a bug report at http://bugzilla.xamarin.com	BTOUCH	Chartboost

If attempting to build anyways, the similar error message is thrown:
Error	1	Unexpected error - Please file a bug report at http://bugzilla.xamarin.com	\\psf\Home\Desktop\Chartboost\BTOUCH	Chartboost

The "Project Properties -> Signing" window shows the error message:
An error occurred trying to load the page.
Value cannot be null.
Parameter name: pUnk


---Build Information---
Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0447006-02429
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06177-004-0447006-02429
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0447006-02429
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0447006-02429
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0447006-02429
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0447006-02429
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0447006-02429
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0447006-02429
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.3.50717.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.20703.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.2
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone
Build 

Microsoft Azure Mobile Services Tools   1.2
Microsoft Azure Mobile Services Tools

NuGet Package Manager   2.8.50313.46
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

PowerShell Tools   1.2
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   12.0.30919.1
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.7.248.0 (8ca7d11db8a6f874c6cd2de6d9ca0f511867ce91)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.18.1.3 (5474129af31e9d3a86cb7482c7c5c7a30ad315f1)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.4.0.0 (209abebbd8f1a292d042420edb45fa5fbd3f017b)
Visual Studio extension to enable development for Xamarin.iOS.

---Build Host Build Information---
=== Xamarin Studio ===

Version 5.5.3 (build 6)
Installation UUID: 8ef63a7c-1b18-40de-a334-7f78777fcb55
Runtime:
	Mono 3.10.0 ((detached/e204655)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000023

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.4.0.16 (Business Edition)
Hash: 80e9ff7
Branch: 
Build date: 2014-10-22 15:09:12-0400

=== Xamarin.Android ===

Version: 4.18.1 (Business Edition)
Android SDK: /Users/kentgreen/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		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)
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 ===

Version: 1.10.0.18 (Business Edition)

=== Build Information ===

Release ID: 505030006
Git revision: fbe3e9453daf6a3bb9a9709ed22bec35f7c9056b
Build date: 2014-10-23 13:08:38-04
Xamarin addins: e44add2b39de4dd57c0742bb2e620dfad84c64c6

=== Operating System ===

Mac OS X 10.10.0
Darwin Kents-MacBook-Pro-3.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64

---Additional Notes---
I'm not sure if the "Unexpected error" & the signing dialog error are actually caused by the same issue or not; but I included them both because the main error is vague.
Comment 1 Jesper 2014-11-19 16:58:32 UTC
I have found a few leads which might help you help me...

1. If I make a new binding library it is not marked as containing unsafe code. The original one is (and has to be since I cannot build without it)
2. The *.a file is marked with build output = ObjcNativeLibrary. This option is not available in the new project I created.

BTW: When you build a new Binding Library in VS the resulting assembly is named $assemblyName$.dll :) You might want to fix that.
Comment 2 Udham Singh 2014-11-21 11:47:35 UTC
I have checked this issue and getting the same behaviour mentioned in bug description. To reproduce this issue I have opened the project attached in bug description in VS, build the project and got the below build error:

'Unexpected error - Please file a bug report at http://bugzilla.xamarin.com   C:\Users\udam\Downloads\project & logs\project & logs\Chartboost\BTOUCH   Chartboost'. 

And when I go to Project Properties -> Signing, windows shows the error message:

'An error occurred trying to load the page.
Value cannot be null.
Parameter name: pUnk'

Screencast : http://www.screencast.com/t/O0jH5Y4shq

Environment Info :

Windows 8

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.50938

Xamarin   3.7.248.0 (8ca7d11db8a6f874c6cd2de6d9ca0f511867ce91)
Comment 3 Jesper 2014-12-01 16:54:33 UTC
Is there any progress with this bug ?
Comment 4 Jesper 2014-12-02 17:28:26 UTC
Are you guys on holiday or perhaps just overwhelmed with bugs ? :)

According to this rather old link - Binding projects are not supported in Visual Studio. Is this still true ? And is this what is causing the bug ?

http://forums.xamarin.com/discussion/1516/can-i-build-binding-projects-in-visual-studio
Comment 5 Kent Green [MSFT] 2014-12-02 17:30:29 UTC
This bug appears to be closely related to the bug here:
https://bugzilla.xamarin.com/show_bug.cgi?id=16555

"Getting build error for monotouch-binding sample 'RouteMe.'"

The bug appears to be the essentially same as what's occurring there, but with
slightly different symptoms / error messages. 

The issue is that the generic error message is indicating there is a bug in the
build; when in actuality the bug is the message itself; and the fact that the
error message is generic.

The project *actually* doesn't build due to the fact that the Objective-C
bindings aren't currently supported in Visual Studio: 

http://developer.xamarin.com/guides/ios/advanced_topics/binding_objective-c/binding_objc_libs/
Comment 6 Kent Green [MSFT] 2014-12-12 16:06:58 UTC
*** Bug 25351 has been marked as a duplicate of this bug. ***
Comment 7 mag@xamarin.com 2016-12-22 17:36:30 UTC
Since this is
Comment 8 mag@xamarin.com 2016-12-22 17:38:15 UTC
Since this is a long time issue and we hace made a lot of improvements related to the connection/build/deploy mechanism between Windows and the Mac, and we have also added correct support for Objective-C bindings, I mark this issue as resolved.

Please feel free to re open it if you still find any related issue.