Forum General
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Visual Studio 2012 Ultimate performance/hang


Im using VS2012 Ultimate and have just purchased a business version of Xamarin.Android. I've created a very small application but experience hangs and very, very slow performance in VS in general after a build/deploy to my device. Quitting VS and restarting always fixes the problem but I have to do it every 4-5-6 deploy.

I've got a 3.4GHz Quad-core Win8 64-bit workstation with 16GB RAM.

Anyone else experience this?


  • I've attached a debugger to VS2012 and enclose what the debugger prints. A lot First-chance exception at 0x75FC4B32 in devenv.exe: Microsoft C++ exception: EEException at memory location 0x1972EADC.

    attached the output file here if it's of any interest. I don't know enough about it to tell if it's my VS that is bugged, or if it's Xamarin.Android and the VS integration.

  • ronnydahlronnydahl NOMember, Beta

    I've had the same problems for a long time (1+ year). It generally works better to deploy to the device than to either start in debug or release mode. Is Xamarin looking into the matter?

  • NewictNewictNewictNewict MYMember
    edited March 2013

    I experienced that quite often too, when that happens, devenv.exe will constantly take about 20-30% of CPU time. And I solve it by "adb kill-server", so far so good, the CPU time will instantly drop. No need to restart Visual Studio.

  • ronnydahlronnydahl NOMember, Beta

    @newict: I tried that as well, but I loose connection to the attached device (VS goes back to "-- Prompt for Device --"). I can only reconnect to the device after I've restarted Visual Studio. Do you experience the same problems or are you able to connect to the device after you've run "adb kill-server"?

    The CPU usage drops instantly by using the command though.

  • fxamfxam MYMember, Beta

    @ronnydahl, click 'Refresh' in the prompt when you debug or run. Click again if the devices are not there yet after a while :)

  • NewictNewictNewictNewict MYMember

    Yes, just click the "Refresh" button.

  • ronnydahlronnydahl NOMember, Beta

    So the solution/workaround when VS freeze and hogs 100 % of one CPU core is to kill the process by running "adb kill-server", loose the connection to the connected device. Then refresh the connected device list several times until the connection is established again?

    Yeah, it works, BUT its a nasty workaround. The important question is still standing; Is Xamarin doing something to actually fix this? Is there something to be done or are we, as paying customers, just gonna have to accept this workaround?

    It'd be nice to get some Xamarin feedback regarding this issue. I have other performance issues (with Android for VS) as well that I will be posting separately.

  • DeanEllisDeanEllis USXamarin Team Xamurai


    There is an open issue which seems to describe the same problem. Also this thread references the same issue and the same work around.

    I will be taking a look at this issue , the first step is going to be replicating it. Does this always happen in VS2012 only or has it occurred in VS2010 as well? What Size project does it happen on?


  • ronnydahlronnydahl NOMember, Beta

    @Dean, thanks for looking into the issue. I've had these problems with both Visual Studio 2010 and 2012 for about a year or so. The current project I'm working is a stripped down version of the MWC application Xamarin made last year. The Android solution contains two projects (Android specific and the shared business library (between iOS and Android). I would say that the project is fairly small and not overly complex. Let me know if I can send you logs and such.

  • DeanEllisDeanEllis USXamarin Team Xamurai

    Are you making use of the Android Log Viewer when this occurs? Is it one of the windows you have available?

  • AlexanderVikenAlexanderViken USMember

    I am only using the output/debug window in VS2012 - Unless the ALV is triggered in the background without my interaction.

  • ronnydahlronnydahl NOMember, Beta

    @dellis: Nope, I'm not making use of the ALV. I just started the project again and the output window has debug output as default. In addition I have have the following entries in the dropdownlist: Build, Build Order, Debug, General, Mac Server Log, Xamarin.Android. The last one never has focus.

  • DeanEllisDeanEllis USXamarin Team Xamurai

    Hmm ok. So its not the ALV...

  • ronnydahlronnydahl NOMember, Beta

    @dellis: Probably not (in my case). Does Visual Studio 2012 work good on your end when you try to debug/run the application on your device(s)?

  • DeanEllisDeanEllis USXamarin Team Xamurai

    it works fine here. I've spent 2 days running and debugging various projects and the only time the CPU went crazy was due to a backup service I was running.

    the only other CPU spike I've seen was when using the Android Log Viewer.

  • ronnydahlronnydahl NOMember, Beta

    Are you running the current bits or are you using an internal development build? I can of course reinstall everything and give it at try, but I prefer not to. I can also make a screencast and share with you if you give me some pointers into what you want to explore.

  • DeanEllisDeanEllis USXamarin Team Xamurai

    @ronnydahl, I'm using the latest 4.6 release, but there is someone else running the same version reporting the issue (

    A screen cast might help, it certainly wouldn't hurt as long as you have the time :)

  • DeanEllisDeanEllis USXamarin Team Xamurai

    Also as few extra questions

    are you using Emulators or devices?
    When it hangs is it only devenv.exe showing 100%?
    Does the adb.exe show high cpu usage as well?

  • OldRedthOldRedth USMember, Insider ✭✭✭

    I've had VS hang as well, occasionally.. When it happens for me, I can seem to save my files and everything before I get out, but the UI itself is non-responsive (I save using ctrl + s).

    One thought I had, is I'm using resharper, and there's a couple other add-ins. I wonder if conflicting add-ins has anything to do with it? @dellis I think you should install resharper to see if that makes it worse, as I think a lot of devs are using resharper these days if they're in VS

  • StuartLodgeStuartLodge USBeta ✭✭✭

    @dellis I get hangs regularly during debug cycles and have just learned to live with it... I also find VS is much slower to deploy and debug than MD/XS (and that it doesn't remember device preferences as well). I mainly only ever use real devices. I never look at adb.exe - for me it's normally quicker to kill and restart VS.

  • DeanEllisDeanEllis USXamarin Team Xamurai

    I installed the trial of resharper and while I don't get a Hang in VS I am beginning to see a long CPU Spike after stopping debugging. In the Task Manager on Win 8 I can see the VS Icon change to the resharper icon during this high CPU usage period.

    Is anyone getting the hang and not using resharper?

  • StuartLodgeStuartLodge USBeta ✭✭✭

    Not using resharper?! Wash your mouth out! As Seb once said "If you are working per hour, and not using Resharper then you are stealing from your employer" ;)

  • ronnydahlronnydahl NOMember, Beta

    After I've ensured that the output window has been fully removed (not just hidden) I've reduced the hang occurrences a lot. I've had to boot VS three times this morning (it's 9:12 am here in Norway) so I don't want to put all the blame on the output window though. I'm also using Resharper btw (no other plugins though).

  • ronnydahlronnydahl NOMember, Beta

    Still crashes/hangs on every fourth/fifth build. Any progress @dellis/Xamarin?

  • DeanEllisDeanEllis USXamarin Team Xamurai

    @ronnydahl I replicated a hang when using the Visual Studio iOS integration I am tracking down the issue as we speak :)

  • ronnydahlronnydahl NOMember, Beta

    @dellis: Good! Just note that the main problems probably isn't centered around the iOS integration but the Android integration. I'm exited to see if the bug you found will solve our challenges. If it does, I will applaud for three days without stopping (note that this may happen during Evolve.. ;) )

  • StuartLodgeStuartLodge USBeta ✭✭✭

    I agree with @ronnydahl - I've not used the iOS integration yet.

    I definitely repro'd it a few times over the weekend. Can team up for London based coding if that helps, Dean?

  • DeanEllisDeanEllis USXamarin Team Xamurai

    I'm still not able to replicate this lockup under android. However do you have the Extension Debug Logging enabled? This is the setting the writes the monodroid.log file to the desktop?

  • DeanEllisDeanEllis USXamarin Team Xamurai

    That setting is in Tools->Options->Xamarin->Android

  • IonutIonut USMember

    I've managed to slow down the CPU usage by opening 'Android Device Logging' window (the 'i' icon near device selection drop-down) and stopping the logging refresh being done.

  • I've exactly the same issue - VS2012 hang (and consumes 20% CPU) just after first debug session. Application is just as is from Android->AndroidApplication template. Currently I'm evaluating Xamarin Android in VS - actually I don't get how this could work so badly for $999 ?!?!

  • HansOlavSundeHansOlavSunde NOMember

    Same problem for me. Both with Visual Studio 2010 and 2012.

  • HansOlavSundeHansOlavSunde NOMember

    I noticed that if I show the Android Log and filter only the Error log items, Visual Studio tends to behave more natural. Be in mind that Visual Studio crashes if you enable the Error filter if the log is empty.

  • DominiqueLouisDominiqueLouis GBMember Xamurai

    @SergeiShirokov.3124 and @HansOlavSunde could you please confirm which version of Xamarin.Android you are using. We fixed a lock up issue in VS, and we just need to confirm if this is a different/new issue or one we've already addressed.



  • HansOlavSundeHansOlavSunde NOMember

    Hi @CartBlanche I am using Xamaring.Android 4.6.04000. By the way, I love your products. :)

  • I've tried both: Xamarin.Android 4.6.04000 (03814ac5) and 4.7.04014 (f6831347). It seems that not using "Android Device Logging" improves experience.

  • Posting it here as well as this thread seems more active then the other one onthe topic. Interesting observation : on my system it's not so much the adb logging that seems to create the load, it's NIS (Norton Internet Security) that does it when the adb server is activated. When it's used, NIS CPU draw goes through the roof. When you kill adb, NIS load falls back to almost nothing ...
    I'm going to try to uninstall NIS now as there's no way you can stop this service while it's active... and continuously killing adb server while debugging to avoid CPU overheat isn't exactly my idea of smooth workflow !

    Would be nice if some others with the same adb load symptoms could verify this observation on their own systems.

Sign In or Register to comment.