Bug 20923 - Error on building project 'System.IO.FileNotFoundException System.Data.Linq'
Summary: Error on building project 'System.IO.FileNotFoundException System.Data.Linq'
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.14.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2014-06-26 18:24 UTC by Rui Marinho
Modified: 2017-06-27 18:12 UTC (History)
2 users (show)

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

Screenshot from output build (26.27 KB, image/png)
2014-06-26 18:24 UTC, Rui Marinho

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 Rui Marinho 2014-06-26 18:24:00 UTC
Created attachment 7205 [details]
Screenshot from output build

Sometimes when i build my Android project i get this exception, if i build a second time it goes away. 

Error	3718	Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'System.Data.Linq.dll'
   at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
   at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
   at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(List`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
   at Xamarin.Android.Tasks.ResolveAssemblies.Execute()	Xamarin.Forms.Labs.Sample.Droid
Comment 1 Jonathan Pryor 2014-06-26 21:08:50 UTC
> Perhaps it doesn't exist in the Mono for Android profile?

The error message is correct, in that System.Data.Linq.dll is not part of the Xamarin.Android profile, and thus it won't compile (unless you're providing your own System.Data.Linq.dll).

That said, you say it builds if you build a second time, which suggests that something else is going on. Could you please provide Diagnostic MSBuild Output for the initial (failing) build?

Comment 2 Rui Marinho 2014-06-27 05:28:20 UTC
Another info this happens in Xamarin.Forms projects.

Thanks for the feedback, i will provide the msbuild diagnostic when i get home.
Comment 3 Chris Hardy [MSFT] 2017-06-27 18:12:27 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!