Bug 44271 - Build fails if closing designer while still loading or is just open
Summary: Build fails if closing designer while still loading or is just open
Status: RESOLVED DUPLICATE of bug 44460
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android Designer (show other bugs)
Version: 4.2.0 (C8)
Hardware: PC Windows
: Normal major
Target Milestone: 4.2.1 (C8SR1)
Assignee: Jérémie Laval
URL:
Depends on:
Blocks:
 
Reported: 2016-09-13 23:32 UTC by James Montemagno [MSFT]
Modified: 2016-09-19 15:18 UTC (History)
4 users (show)

Tags:
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 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 DUPLICATE of bug 44460

Description James Montemagno [MSFT] 2016-09-13 23:32:56 UTC
Create a new Android Layout.

Double click it to get the green loading bar.

While loading close it and try to build again.

You will get several errors:

Severity	Code	Description	Project	File	Line	Suppression State
Error		The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.IOException: The process cannot access the file 'formsviewgroup.jar' because it is being used by another process.
   at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
   at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
   at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(ICollection`1 jars, ICollection`1 resolvedResourceDirectories, ICollection`1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments)
   at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()	App4.Droid			


Severity	Code	Description	Project	File	Line	Suppression State
Error		The process cannot access the file 'classes.jar' because it is being used by another process.	App4.Droid			

etc
Comment 1 James Montemagno [MSFT] 2016-09-14 00:27:31 UTC
Additionally, if the designer is open the files seem to be locked too.
Comment 2 Jérémie Laval 2016-09-14 15:34:12 UTC
Is that creating a layout in the Android project of a Forms app? I see a formsviewgroup.jar in there so it's just to make sure.
Comment 3 Jérémie Laval 2016-09-19 15:18:48 UTC
Found issue, linking to other bug for consolidation

*** This bug has been marked as a duplicate of bug 44460 ***