Bug 51153 - Unexpected error - System.IO.FileNotFoundException: Could not load assembly 'App11...
Summary: Unexpected error - System.IO.FileNotFoundException: Could not load assembly '...
Status: RESOLVED DUPLICATE of bug 50914
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: dean.ellis
Depends on:
Reported: 2016-12-29 23:20 UTC by Charlie Pastre
Modified: 2016-12-30 02:45 UTC (History)
6 users (show)

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

App11.Droid_Compile_ceccfc4c.designtime.log (232.23 KB, text/plain)
2016-12-29 23:20 UTC, Charlie Pastre

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 Charlie Pastre 2016-12-29 23:20:39 UTC
Created attachment 19038 [details]

Environment is Visual Studio 2015 Community. Steps:

1. New Project
2. Blank App (Xamarin.Forms Portable)
3. Defaults from there on
4. Update Xamarin.Forms NuGet package
5. Build Solution

Two errors:
1) Severity	Code	Description	Project	File	Line	Suppression State
Warning		Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. Reason: System.IO.FileNotFoundException: Could not load assembly 'App1, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?	App11.Droid			

2) Severity	Code	Description	Project	File	Line	Suppression State	Detail Description
Warning	IDE0006	Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled.	App11.Droid		1	Active	To see what caused the issue, please try below.

1. Close Visual Studio
2. Open a Visual Studio Developer Command Prompt
3. Set environment variable “TraceDesignTime” to true (set TraceDesignTime=true)
4. Delete .vs directory/.suo file
5. Restart VS from the command prompt you set the environment varaible (devenv)
6. Open the solution
7. Check 'C:\Users\Charlie\AppData\Local\Temp\\App11.Droid_*.designtime.log' and look for the failed tasks (FAILED)

C:\Users\Charlie\AppData\Local\Temp\\App11.Droid_*.designtime.log is attached for reference.
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2016-12-30 02:37:45 UTC

*** This bug has been marked as a duplicate of bug 50914 ***
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2016-12-30 02:45:52 UTC
(For additional context in case it helps clear up some possible ambiguity, note that the first warning message about "Unexpected error" has changed to "The "ResolveLibraryProjectImports" task failed unexpectedly" in XamarinVS 4.2 and higher.

As discussed in Bug 50914, you can ignore these warnings if you don't need the missing IntelliSense features, or you can build all the dependencies of the Android project, or you you could try the hack mentioned at the bottom of Bug 50914, Comment 1.)