Bug 31217 - MT3001: Could not AOT the assembly System.Net.Http.Formatting.dll
Summary: MT3001: Could not AOT the assembly System.Net.Http.Formatting.dll
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler ()
Version: master
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
Depends on:
Reported: 2015-06-18 07:02 UTC by gilberto
Modified: 2015-06-23 06:47 UTC (History)
3 users (show)

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:

Description gilberto 2015-06-18 07:02:10 UTC
I have been trying to build the app directly to iPhone and it throws this error. 

I tried to fix it with previous BUGs reported but I can solve this issue.

Xamarin Studio 5.9.3 (build 1)
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-06-18 09:31:30 UTC
Can you attach a test case we can use to reproduce this?
Comment 2 Zoltan Varga 2015-06-18 16:44:53 UTC
Probably a dup of:
i.e. a linker issue.
Comment 3 gilberto 2015-06-19 04:08:12 UTC
I don't have access to open the link above.

Error: 'You are not authorized to access bug #31130.'
Comment 4 gilberto 2015-06-19 06:33:31 UTC
@Rolf Bjarne Kvinge 

I can not replicate the same problem with a test case. Could you have a look at the log below:

		/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -Qunused-arguments -miphoneos-version-min=7.1 -arch armv7 -c -DDEBUG  -o /Users/gilbertofonte/svn/mcmobileapp/trunk/iOS/obj/iPhone/Debug/mtouch-cache/mscorlib.dll.armv7.o -x assembler /Users/gilbertofonte/svn/mcmobileapp/trunk/iOS/obj/iPhone/Debug/mtouch-cache/mscorlib.dll.armv7.s
		WARNING: The runtime version supported by this application is unavailable.
		Using default runtime: v4.0.30319
		Mono Ahead of Time compiler - compiling assembly /Users/gilbertofonte/svn/mcmobileapp/trunk/iOS/obj/iPhone/Debug/mtouch-cache/Build/mscorlib.dll
		Code: 2499384(67%) Info: 53144(1%) Ex Info: 879164(23%) Unwind Info: 12208(0%) Class Info: 27646(0%) PLT: 7078(0%) GOT Info: 160992(4%) Offsets: 50445(1%) GOT: 45204
		Compiled: 10114/10118 (99%), No GOT slots: 6334 (62%), Direct calls: 4336 (27%)
		3 methods are generic (0%)
		Output file: '/Users/gilbertofonte/svn/mcmobileapp/trunk/iOS/obj/iPhone/Debug/mtouch-cache/mscorlib.dll.armv7.s'.
		Linking symbol: '_mono_aot_module_mscorlib_info'.
		JIT time: 1602 ms, Generation time: 2084 ms, Assembly+Link time: 11 ms.
MTOUCH: error MT3001: Could not AOT the assembly '/Users/gilbertofonte/svn/mcmobileapp/trunk/iOS/obj/iPhone/Debug/mtouch-cache/Build/System.Net.Http.Formatting.dll'
		  at MonoTouch.AOTTask.Build () [0x00000] in <filename unknown>:0 
		  at MonoTouch.BuildTask.Execute () [0x00000] in <filename unknown>:0 
		  at MonoTouch.Target+<Compile>c__AnonStorey0.<>m__0 (MonoTouch.BuildTask v) [0x00000] in <filename unknown>:0 
		  at System.Threading.Tasks.Parallel+<ForEachWorker>c__AnonStorey6`2[MonoTouch.BuildTask,System.Object].<>m__0 (Int32 i) [0x00000] in <filename unknown>:0 
		  at System.Threading.Tasks.Parallel+<ForWorker>c__AnonStorey3`1[System.Object].<>m__1 () [0x00000] in <filename unknown>:0 
	Task "MTouch" execution -- FAILED
	Done building target "_CompileToNative" in project "/Users/gilbertofonte/svn/mcmobileapp/trunk/iOS/MCA.iOS.csproj".-- FAILED
Done building project "/Users/gilbertofonte/svn/mcmobileapp/trunk/iOS/MCA.iOS.csproj".-- FAILED



/Users/gilbertofonte/svn/mcmobileapp/trunk/iOS/MCA.iOS.csproj (Build) ->
/Library/Frameworks/Mono.framework/Versions/4.0.1/lib/mono/4.5/Microsoft.Common.targets (ResolveProjectReferences target) ->
/Users/gilbertofonte/svn/mcmobileapp/trunk/MCA/MCA.csproj (GetTargetPath) ->
/Users/gilbertofonte/svn/mcmobileapp/trunk/packages/Microsoft.Bcl.Build.1.0.21/build/Microsoft.Bcl.Build.targets (BclBuildValidateNugetPackageReferences target) ->

	:  warning : All projects referencing MCA.csproj must install nuget package Microsoft.Bcl.Build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317569.

/Users/gilbertofonte/svn/mcmobileapp/trunk/iOS/MCA.iOS.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CompileToNative target) ->

	MTOUCH:  warning MT3005: The dependency 'System.Threading.Tasks, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of the assembly 'System.Net.Http.Formatting, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' was not found. Please review the project's references.
	MTOUCH:  warning MT3006: Could not compute a complete dependency map for the project. This will result in slower build times because Xamarin.iOS can't properly detect what needs to be rebuilt (and what does not need to be rebuilt). Please review previous warnings for more details.

---------------------- Done ----------------------

Build: 1 error, 3 warnings

Comment 5 Rolf Bjarne Kvinge [MSFT] 2015-06-19 08:22:23 UTC
@Gilberto, yes, these issues can sometimes be hard to reproduce in a smaller test case. Maybe we could get access to your full project instead?
Comment 6 gilberto 2015-06-23 06:47:02 UTC
@Rolf. I have fixed the issue adding the package System.Net.Http into the iOS Project. But wasn't necessary before. I think that happened after update Xamarin Studio. Anyway, I think for now I will keep this package. Thanks for your help.