Bug 56487 - MT0008 due to project with spaces
Summary: MT0008 due to project with spaces
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 10.10 (d15-2)
Hardware: PC Mac OS
: --- normal
Target Milestone: 15.3
Assignee: Ankit Jain
URL:
: 56494 58075 ()
Depends on:
Blocks:
 
Reported: 2017-05-16 10:00 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2017-07-14 09:31 UTC (History)
9 users (show)

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


Attachments
Diagnostic Build Log When Error Occurs (1.70 MB, text/plain)
2017-05-16 15:11 UTC, Matt Soucoup
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 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:
VERIFIED FIXED

Description Rolf Bjarne Kvinge [MSFT] 2017-05-16 10:00:16 UTC
Error:

/Projects/ACME Networks/Alpha Xamarin/iOS/MTOUCH: Error MT0008: You should provide one root assembly only, found 3 assemblies: 'Networks/Alpha', 'Xamarin/iOS/obj/iPhoneSimulator/Debug/device-builds/iphone9.1-10.3/Entitlements.xcent/', '/Projects/ACME Networks/Alpha Xamarin/iOS/bin/iPhoneSimulator/Debug/MyNetApp.iOS.exe' (MT0008) (App)

The code at first looks fine: https://github.com/xamarin/xamarin-macios/blob/a4214e9c951c03c0ca60af3990280933da7ae51d/msbuild/Xamarin.iOS.Tasks.Core/Tasks/MTouchTaskBase.cs#L316

but then I realised it's probably a matter of double-quoting, since these values are later added to -gcc_flags.

Source: https://developercommunity.visualstudio.com/content/problem/56515/visual-studio-for-mac-throwing-mtouch-mt0008-error.html
Comment 1 Sebastien Pouliot 2017-05-16 12:35:45 UTC
*** Bug 56494 has been marked as a duplicate of this bug. ***
Comment 2 Vincent Dondain [MSFT] 2017-05-16 14:13:51 UTC
Hi,

I tried to reproduce this but I couldn't using the following environment: https://gist.github.com/VincentDondain/91b1d7565cb379f5dbc96aa1996da459

I created a quick test case using folders with spaces like the user: "ACME Networks" and "Alpha Xamarin": https://www.dropbox.com/s/znim69c5x4sqdon/Bug56487.zip?dl=0

Here's my mtouch build log:
https://gist.github.com/VincentDondain/6a73fb7907bbc89e737f6c4bcdc9952a

@rolf let me know if you tried to repro otherwise I think we'll need more information from the customer.
Comment 3 Sebastien Pouliot 2017-05-16 14:18:21 UTC
@Vincent please follow up with the reporter using the link in the description. A full build log should give the required information.
Comment 4 Matt Soucoup 2017-05-16 15:10:43 UTC
I am able to reproduce - I believe the key here is the Realm NuGets need to be added.

This should do it: https://www.nuget.org/packages/Realm/

Will also upload my diagnostic build log w/ the error.
Comment 5 Matt Soucoup 2017-05-16 15:11:42 UTC
Created attachment 22206 [details]
Diagnostic Build Log When Error Occurs
Comment 6 Sebastien Pouliot 2017-05-16 15:15:50 UTC
Thanks Matt!

--gcc_flags "/"-L/Users/msoucoup/Desktop/Realm Test/packages/Realm.1.2.1/build/../native/ios/universal/" -lrealm-wrappers -lz -framework Security"

^ Like Rolf suspected (in the original description) the issue with double quoting.
Comment 7 Jeffrey Stedfast 2017-05-24 15:21:15 UTC
Looks like the code is actually correctly escaping the quotes, but msbuild is converting \'s into /'s.

@Ankit: can you look into this? Is the string returned by GenerateCommandLineCommands() modified in any way? Or is the problem even lower level, such as in the runtime?
Comment 8 Jeffrey Stedfast 2017-05-24 15:22:43 UTC
Oops, forgot to add Ankit to the cc list.
Comment 9 Ankit Jain 2017-05-31 19:41:47 UTC
This is fixed on master and d15.3 branch.
Comment 10 Rolf Bjarne Kvinge [MSFT] 2017-07-12 10:55:14 UTC
*** Bug 58075 has been marked as a duplicate of this bug. ***
Comment 11 Neeraj Deshmukh 2017-07-14 09:31:17 UTC
=== Visual Studio Community 2017 for Mac (Preview) ===
Version 7.1 Preview (7.1 build 1281)
Gist: https://gist.github.com/ganorkargaurav/9d7d0d67c6a36c7f332fbd1b90bb9d95