Bug 18452 - Visual Studio hangs when including, excluding, or saving files in Android resource folders
Summary: Visual Studio hangs when including, excluding, or saving files in Android res...
Status: RESOLVED DUPLICATE of bug 31519
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: 1.12.x
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2014-03-18 19:46 UTC by David Schwegler
Modified: 2016-03-24 15:59 UTC (History)
23 users (show)

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


Attachments
Wait Chain Analysis results (10.72 KB, image/png)
2014-05-26 20:48 UTC, Zack Gramana
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 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 31519

Description David Schwegler 2014-03-18 19:46:30 UTC
Repro 1:
1. Click New -> Android application
2. In the Solution explorer, right click on Resources/Drawable/Icon.png and click "Exclude from project". 

OR 

Repro 2: Save a .axml file

In both cases, Visual studio hangs, indefinitely giving a working indicator and a "Visual studio is Busy" notification.

A similar problem was reported here: https://bugzilla.xamarin.com/show_bug.cgi?id=16357

Not sure what caused this to suddenly start happening...presumably one of the last couple updates. I am up-to-date on the beta channel.


SYSTEM INFO:
Microsoft Visual Studio Professional 2013
Version 12.0.30110.00 Update 1
Microsoft .NET Framework
Version 4.5.51641

Xamarin.Android   4.12.02001 (a1e3982a)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   1.10.47 (3d6a125d)
Visual Studio extension to enable development for Xamarin.iOS
Comment 1 Shruti 2014-03-19 03:05:33 UTC
I have followed the steps mentioned below to check this issue but issue is not 
reproduced at my end.

1. Open new Android Project.
2. In the solution explorer, right clicked on Resources/Drawable/Icon.png   and  clicked on "Exclude from project". Visual studio did not hang.
3. Then, I opened Main.axml file and save it. 
4. Then I launched the project, It just asked to include the Icon.png file.
5. I included the Icon.png file. 

Screen Cast Information :http://screencast.com/t/f8oLhiMmzAS

Environment Info :

Microsoft Visual Studio Professional 2013
Version 12.0.21005.1 REL
Microsoft .NET Framework
Version 4.5.50938

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0444002-02074
Microsoft LightSwitch for Visual Studio 2013

Microsoft Office Developer Tools for Visual Studio 2013 ENU   06177-004-0444002-02074
Microsoft Office Developer Tools for Visual Studio 2013 ENU

Team Explorer for Visual Studio 2013   06177-004-0444002-02074
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0444002-02074
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0444002-02074
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0444002-02074
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0444002-02074
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0444002-02074
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0444002-02074
Windows Phone SDK 8.0 - ENU

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.0.11001.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.0
Provides common services for use by Azure Mobile Services and Windows Azure Tools.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone
Build 

Microsoft Web Developer Tools 2013   2.0.40926.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Windows Azure Web Sites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Windows Azure

NuGet Package Manager   2.7.40911.287
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   12.0.30919.1
Microsoft SQL Server Data Tools

Windows Azure Mobile Services Tools   1.0
Windows Azure Mobile Services Tools

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin.Android   4.12.02001 (a1e3982a)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   1.10.47 (3d6a125d)
Visual Studio extension to enable development for Xamarin.iOS


Please provide more information, If I missed anything in above mentioned steps.
Comment 2 David Schwegler 2014-03-19 16:59:23 UTC
Could it be a problem that I'm on android SDK 22.3 instead of 22.6.1?
Comment 3 abe 2014-03-26 15:35:11 UTC
Also experienced this issue when trying to add or exclude files from the Resources folder.

SYSTEM INFO:
Microsoft Visual Studio Professional 2013 Version 12.0.30110.00 Update 1
Microsoft .NET Framework Version 4.5.50938
Xamarin.Android   4.12.02001 (a1e3982a)
Xamarin.iOS   1.10.47 (3d6a125d)
Comment 4 Michel Uiterwijk 2014-03-27 05:00:00 UTC
I experience the same problem when adding, removing or excluding folders or files in Resources folder. Only solution is to end the task in Task Manager.

Microsoft Visual Studio Professional 2012 Version 11.0.61030.00 Update 4
Microsoft .NET Framework Version 4.5.51641
Xamarin.Android   4.12.02001 (a1e3982a)
Xamarin.iOS   1.10.47 (3d6a125d)
Comment 5 David Schwegler 2014-03-28 15:22:53 UTC
This was fixed for me when I updated my SDK from 22.3 to 22.6.1.
Comment 6 abe 2014-03-28 16:59:14 UTC
Just updated to 22.6.2 and it worked.
Comment 7 Michel Uiterwijk 2014-03-28 17:25:36 UTC
Just updated SDK to 22.6.2 and Visual Studio 2012 still hangs when I add a folder or file in Resources.
Comment 8 Niels 2014-05-04 08:18:11 UTC
I also encounter this problem, but only when I add a file or folder to the Resources folder. My workaround is to create the folder at project level and then copy it to the Resources folder. Also copying files an folders within the Resources folder makes Visual Studio hang.
Comment 9 Niels 2014-05-04 08:36:51 UTC
Also saving a file (after editing) in the Resources folder takes forever. Not workable.
Comment 10 Roman Cervenak 2014-05-13 05:18:24 UTC
Same problem for me. VS always hangs when adding new file to resources folder, or saving changes to existing one.

Microsoft Visual Studio Professional 2012
Version 11.0.61030.00 Update 4
Microsoft .NET Framework
Version 4.5.50938

Installed Version: Professional

Office Developer Tools   04938-004-0034007-02436
Microsoft Office Developer Tools

Team Explorer for Visual Studio 2012   04938-004-0034007-02436
Microsoft Team Explorer for Visual Studio 2012

Visual Basic 2012   04938-004-0034007-02436
Microsoft Visual Basic 2012

Visual C# 2012   04938-004-0034007-02436
Microsoft Visual C# 2012

Visual C++ 2012   04938-004-0034007-02436
Microsoft Visual C++ 2012

Visual F# 2012   04938-004-0034007-02436
Microsoft Visual F# 2012

Visual Studio 2012 Code Analysis Spell Checker   04938-004-0034007-02436
Microsoft® Visual Studio® 2012 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Visual Studio 2012 SharePoint Developer Tools   04938-004-0034007-02436
Microsoft Visual Studio 2012 SharePoint Developer Tools

ASP.NET and Web Tools   2012.3.41009
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Windows Azure Web Sites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Windows Azure

Color Theme Designer   1.0
Designer for creating new color themes

Common Azure Tools   1.0
Provides common services for use by Azure Mobile Services and Windows Azure Tools.

Indent Guides   14
Indent Guides

Adds visual guides at each indentation level.

NuGet Package Manager   2.8.50313.31
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.0
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   11.1.20905.0
Microsoft SQL Server Data Tools

Windows Azure Tools   October 2012
Windows Azure Tools for Microsoft Visual Studio 2012 - October 2012 v1.8.51019.1603

Windows Azure Tools   2.1
Windows Azure Tools for Microsoft Visual Studio 2012 - v2.1.10716.1601

Xamarin for Visual Studio   1.12.278.0 (b3acb09afda91828e5bd48308ac8e7433d30f330)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android

Xamarin.Android   4.12.3.3 (7f0e3d3cfb9b36570e8d7862a33d0310238c814d)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   1.12.278.0 (b3acb09afda91828e5bd48308ac8e7433d30f330)
Visual Studio extension to enable development for Xamarin.iOS

Git Extensions
Git Extensions is a graphical interface for Git
For more information about Git Extensions, see the Git Extensions website at
http://code.google.com/p/gitextensions/
Copyright © 2012 Henk Westhuis
Comment 11 Zack Gramana 2014-05-26 20:48:00 UTC
Created attachment 6881 [details]
Wait Chain Analysis results

Similar to Michel, updating my Android Tools from 22.3 to 22.6.1 resolved the hang.

I've attached the results of "Wait Chain Analysis" on the devenv.exe process.
Comment 12 Roman Cervenak 2014-05-27 03:07:06 UTC
I can confirm, update to Android SDK Tools 22.6.3 resolved the issue.
Comment 13 Niels 2014-05-27 03:39:48 UTC
Also resolved after updating SDK.
Comment 14 Goncalo Oliveira 2014-10-02 06:27:14 UTC
I can confirm that updating the SDK resolved the issue.
Comment 15 Andreas Merz 2014-10-23 05:40:41 UTC
I can confirm that updating the SDK resolved the issue.
Comment 17 vicky 2015-06-11 06:21:03 UTC
My SDK is already in update, but still my visual studio gets hang on adding images inside the Resource folder.
Comment 20 Rohit Vipin Mathews 2015-06-22 07:06:17 UTC
On the latest SDK i experience it a lot of times. Its totally impossible to do anything in the resource/drawable folder from VS 2013
Comment 21 krzysztof.malmur 2015-06-23 05:47:09 UTC
"Its totally impossible to do
anything in the resource/drawable folder from VS 2013"

I've got the same problem.
Comment 22 Anthony 2015-06-24 16:54:26 UTC
I am having the same issue. I am unable to add, delete, include, or exclude anything from the Resources folder without Visual Studio hanging and eventually crashing or having to be forced to be shut down.

Updated to the latest Android SDK and the problem still persists.
Comment 23 Brendan Zagaeski (Xamarin Team, assistant) 2015-06-30 21:48:22 UTC
Marking as a duplicate of a new report on the issue to help tidy up the bug database.

*** This bug has been marked as a duplicate of bug 31519 ***
Comment 24 Jacob Ebey 2015-07-08 14:50:58 UTC
I am experiencing the same issues described above.
Comment 25 Erlend Angelsen 2015-07-14 08:47:58 UTC
I am experiencing the same issues described above.
Comment 26 Mahmood 2015-08-10 12:33:42 UTC
I am experiencing the same issues but I manage to delete by using the following steps:

step 1: Unload the project
step 2: comment out or delete the resource file that you want to get rid of
step 3: Delete the file(resource item) from the explorer
step 4: Reload the project

Hope it will solve the problem
Comment 27 nickelnext 2015-08-18 14:53:45 UTC
Same issue experienced when trying to include files in a project.

Keeps hanging, only solution is to kill vs using task manager.
Comment 28 Brendan Zagaeski (Xamarin Team, assistant) 2015-08-18 15:37:51 UTC
To be clear, this bug has been marked as a duplicate. That means the best place to look for up-to-date information (including possible workarounds) is on the duplicate: Bug 31519.

Also note that there is another bug (Bug 32845) that has very similar symptoms. That bug has different workarounds.
Comment 29 nickelnext 2015-08-27 07:56:25 UTC
Ok i feel really sorry about this, but I don't understand what's going on.

This is my sdk, opened from VS.

<a href='http://postimg.org/image/mcmjkhpbn/' target='_blank'><img src='http://s21.postimg.org/mcmjkhpbn/android.jpg' border='0' alt="android" /></a>

Now I don't know if i'm making something wrong. But when i include a file in the project (in android/resources) VS 2013 and 2015 hangs.

Sorry if it's a duplicate or not, but wether i look i see people telling me it's been solved but for me still happens.

Cheers
Comment 30 Brendan Zagaeski (Xamarin Team, assistant) 2015-08-27 14:41:46 UTC
@nickelnext, for this particular situation, I'd recommend emailing contact@xamarin.com to get a bit more one-on-one help checking on the particular issue you're seeing on your system.

Ideally, you can include the bug number (18452) in some way in the Subject of your email. Thanks!
Comment 31 Niels 2015-09-11 03:23:22 UTC
Seems like the problem is back again...
Comment 32 Niels 2015-09-11 03:32:02 UTC
The problem is with the android resources folder. 

Workaround: add files to project level and then drag them to resources folder.
Comment 33 Jakub Holovsky 2016-03-24 09:27:13 UTC
Having the same issue.
Comment 34 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-24 15:59:39 UTC
This is an old bug report that was resolved as a duplicate. The most common cause of this problem historically has been when a new Android SDK Tools update has introduced an API breakage. The current non-preview versions of the Android SDK _are_ compatible with the current Stable and Alpha versions of Xamarin. If you have the Android N previews installed, that could cause incompatibilities [1].

[1] https://releases.xamarin.com/technical-bulletin-android-n/



For any users seeing this issue with more recent Xamarin versions, please file a new bug report that includes the following information:



1. The following version information, collected from the Android SDK Manager:

- Android SDK Tools
- Android SDK Platform-tools
- Android SDK Build-tools

(See also "Android SDK Tools" on https://kb.xamarin.com/customer/portal/articles/1675684#android-sdk-tools-versions)



2. Your precise Xamarin version information. Ideally if you have both Visual Studio and Xamarin Studio installed, include all of the information from:

"Help -> About -> Show Details -> Copy Information [button]"


If you only have Visual Studio installed, please instead include the information from:

"Help -> About Microsoft Visual Studio -> Copy Info [button]"



3. If possible, please also collect a call stack of Visual Studio's main thread [1] when it is hanging, and include that on your new bug report as well.

[1] https://kb.xamarin.com/customer/en/portal/articles/2232835-how-do-i-collect-the-call-stack-of-visual-studio-s-main-thread-



4. The steps you're following to hit the problem.



Thanks in advance,
Brendan
Xamarin Customer Support