Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 15146 [details]
About two weeks ago after I installed XamarinVS 188.8.131.52 my VS2015 started to sometimes hang when I press F5 to build and deploy to my Android device. When this happens, I can only kill devenv via the Task Manager (VS takes about 50% of the CPU at that time).
Unfortunately when I restart VS and try again, it hangs again. It even hang when I tried to deploy the iOS project or clean the solution from within VS.
The first time when that happened, I tried to delete all bin and obj folders, reboot the machine, revert to an older version of XamarinVS, I even restored a version of my virtual machine from mid of January and tried with the same solution and even that hang. After two days of frustration I found out that it works again when I delete the .vs folder.
Unfortunately I have this problem at least once a day now. I think it also correlates with editing some Android layouts in .axml files. But this could also be a coincidence because I do mostly that currently and I started with it at the same time I installed 184.108.40.206.
I found bug #36185 last week. It is a different problem, but I used the comments from there to get more info. It always seems to hang in Xamarin.VisualStudio.MsBuild.MsBuildService. Although I found two methods where it occurred: CreateBuildSubmission and BuildSubmission.
I run Windows 10 in a Parallels VM on the Mac. My solution is written in Xamarin Forms and currently includes only Android and iOS projects. The attached .zip includes more info which I thought useful.
VS_about.txt The About Visual Studio dialogue with all the installed versions
VS_hangs.png A screenshot of VS when it hangs (statusbar says Deploy succeeded, but according to the Output window the build is not finished)
VS_attach_to_devenv.png An error message I get when attaching to devenv from a different VS instance.
VS_debug1.png A screenshot of the debugging VS with Call Stack hanging in BuildSubmission.
VS_debug2.png A screenshot of the debugging VS with Call Stack hanging in CreateBuildSubmission.
If you need more, I'm also available via Skype and Team Viewer.
I had the same Problem. Seems to work again without any Problems after I changed vs Option "Maximum number of parallel Project builds" from 4 to 1...
VS -> Tools -> Options -> Projects and Solutions -> Build and Run
I will add some of the text from call stacks in the screenshots for extra searchability.
### Transcribed excerpt of the call stack from VS_debug1.png
> Xamarin.VisualStudio.dll!Xamarin.VisualStudio.MsBuild.MsBuildService.BuildSubmission(Microsoft.VisualStudio.Shell.Interop.IVsBuildManagerAccessor accessor, Microsoft.Build.Execution.BuildSubmission submission, bool buildInProgress, ...
> Xamarin.VisualStudio.Android.dll!Xamarin.VisualStudio.Android.Services.AndroidToolsBuildService.BuildProject(EnvDTE.Project project, string target, Xamarin.VisualStudio.IProgressReport progress, ref System.Exception ex, bool designTimeBuild)
> Xamarin.VisualStudio.Android.dll!Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject.OnBuildDone(EnvDTE.vsBuildScope scope, EnvDTE.vsBuildAction action)
### Transcribed excerpt of the call stack from VS_debug2.png
> Xamarin.VisualStudio.dll!Xamarin.VisualStudio.MsBuild.MsBuildService.CreateBuildSubmission(string targetsToBuild, string fullName, Microsoft.Build.Framework.ILogger loggers, System.Collections.Generic.IDictionary<string, string> globalProperties,
> Xamarin.VisualStudio.Android.dll!Xamarin.VisualStudio.Android.Services.AndroidToolsBuildService.BuildProject(EnvDTE.Project project, string target, Xamarin.VisualStudio.IProgressReport progress, ref System.Exception ex, bool designTimeBuild) Line 51
> Xamarin.VisualStudio.Android.dll!Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject.AndroidResourcesHasBuildErrors() Line 509
> Xamarin.VisualStudio.Android.dll!Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject.OnBuildDone(EnvDTE.vsBuildScope scope, EnvDTE.vsBuildAction action) Line 518
I think this can be closed. The problem does not occur anymore.
I'm on XamarinVS 220.127.116.11 now. I cannot use a newer one because of https://bugzilla.xamarin.com/show_bug.cgi?id=38982
My Maximum number of parallel Project builds is at 2. I cannot remember whether I changed it manually.
I still have the problem. And I am now sure that it only happens, when I had some .axml files open. I don't do that very often, so the problem did not happen often enough and I thought it was gone in the meantime. But it is still there.
I even upgraded to VS 2015 Enterprise (from Prof.) and XamarinVS 18.104.22.168 in the meantime, but the problem persists.
When I open some .axml files and try to compile Android afterwards, VS hangs. Even if I reopen VS after the hang, the .axml files are still open and I don't switch to them (a .cs file is in the foreground) or edit them and try to compile, it does not work. I have to close the .axml files, restart VS and then it works.
Here is some information from my current environment. I can reproduce the bug. You could contact me and connect via TeamViewer at any time to look for more information yourself.
Microsoft Visual Studio Enterprise 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Xamarin 22.214.171.124 (a9c7826)
Xamarin.Android 126.96.36.199 (ee215fc)
Xamarin.iOS 188.8.131.52 (be25da5)
Call stack of hung VS from just now:
mscorlib.dll!System.IO.Path.HasIllegalCharacters(string path, bool checkAdditional) Unknown
mscorlib.dll!System.IO.Path.CheckInvalidPathChars(string path, bool checkAdditional) Unknown
mscorlib.dll!System.IO.Path.NormalizePath(string path, bool fullCheck, int maxPathLength, bool expandShortPaths) Unknown
mscorlib.dll!System.IO.Path.GetFullPathInternal(string path) Unknown
mscorlib.dll!System.IO.File.InternalExistsHelper(string path, bool checkHost) Unknown
Microsoft.Build.dll!Microsoft.Build.Execution.BuildParameters.CheckMSBuildExeExistsAt(string path) Unknown
Microsoft.Build.dll!Microsoft.Build.Execution.BuildParameters.Initialize(Microsoft.Build.Collections.PropertyDictionary<Microsoft.Build.Execution.ProjectPropertyInstance> environmentProperties, Microsoft.Build.Evaluation.ProjectRootElementCache projectRootElementCache, Microsoft.Build.Evaluation.ToolsetProvider toolsetProvider) Unknown
Microsoft.Build.dll!Microsoft.Build.Execution.BuildParameters.BuildParameters(Microsoft.Build.Evaluation.ProjectCollection projectCollection) Unknown
Microsoft.VisualStudio.CommonIDE.dll!Microsoft.VisualStudio.CommonIDE.BuildManager.BuildManagerAccessor.PrepareDesignTimeBuild(string logFileName) Unknown
Microsoft.VisualStudio.CommonIDE.dll!Microsoft.VisualStudio.CommonIDE.BuildManager.BuildManagerAccessor.AcquireBuildResources(Microsoft.VisualStudio.Shell.Interop.VSBUILDMANAGERRESOURCE fResources, string logFileName, out uint phCookie) Unknown
Microsoft.VisualStudio.CommonIDE.dll!Microsoft.VisualStudio.Build.ComInteropWrapper.ProjectShim.BuildTargetsImpl(string targetNamesToBuild, Microsoft.VisualStudio.Build.ComInteropWrapper.ITargetOutputs targetOutputs, bool retainCachedProjectInstance, bool isRealBuild, bool isOutOfProcBuild, Microsoft.VisualStudio.Build.ComInteropWrapper.IProjectShimBuildTargetsAsyncCallback callback) Unknown
Microsoft.VisualStudio.CommonIDE.dll!Microsoft.VisualStudio.Build.ComInteropWrapper.ProjectShim.BuildTargetListWithOutputs(string targetList, Microsoft.VisualStudio.Build.ComInteropWrapper.ITargetOutputs targetOutputs, bool isRealBuild, bool isOutOfProcBuild) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.DispatcherSynchronizationContext.Wait(System.IntPtr waitHandles, bool waitAll, int millisecondsTimeout) Unknown
mscorlib.dll!System.Threading.SynchronizationContext.InvokeWaitMethodHelper(System.Threading.SynchronizationContext syncContext, System.IntPtr waitHandles, bool waitAll, int millisecondsTimeout) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, long millisecondsTimeout, bool hasThreadAffinity, bool exitContext) Unknown
mscorlib.dll!System.Threading.WaitHandle.WaitOne(int millisecondsTimeout, bool exitContext) Unknown
> Xamarin.VisualStudio.dll!Xamarin.VisualStudio.MsBuild.MsBuildService.BuildSubmisson(Microsoft.VisualStudio.Shell.Interop.IVsBuildManagerAccessor accessor, Microsoft.Build.Execution.BuildSubmission submission, bool buildInProgress, Microsoft.Build.Framework.ILogger loggers) Unknown
Xamarin.VisualStudio.Android.dll!Xamarin.VisualStudio.Android.Services.AndroidToolsBuildService.BuildProject(EnvDTE.Project project, string target, Xamarin.VisualStudio.IProgressReport progress, ref System.Exception ex, bool designTimeBuild) Unknown
Xamarin.VisualStudio.Android.dll!Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject.OnBuildDone(EnvDTE.vsBuildScope scope, EnvDTE.vsBuildAction action) Unknown
EnvDTE.dll!EnvDTE._dispBuildEvents_SinkHelper.OnBuildDone(EnvDTE.vsBuildScope A_1, EnvDTE.vsBuildAction A_2) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
I tried to let VS continue and break at different times. It always stopped in Xamarin.VisualStudio.MsBuild.MsBuildService.BuildSubmisson, but what it called from there was different.
At one time I stopped when it tried to throw an System.InvalidOperationException "The operation cannot be completed because a build is already in progress."
Maybe that helps you to find the exact spot where it happened.
## Note to the Xamarin team
It appears I might have found a fairly consistent way to replicate this problem in the Cycle 8 builds in particular: Bug 43565. Admittedly the test case on that bug is a Xamarin.iOS project and I only see the problem with Cycle 8 (unlike the older versions mentioned on this bug), so there is still a chance the 2 problems are distinct, but the call stack does look quite similar, and deleting the `.suo` file (or the `.vs` folder) helps in that case too.
Fixed in version 184.108.40.2069 (cycle8)
Commit: 9c61c83753831cb024f87f8ed47ca4925aeb2a9f (xamarin/XamarinVS)
@Michael, Could you please confirm us that the issue has been fixed at your end with our current beta builds.
repro steps from @jmt:
1. open designer
2. make changes in resources. Some resource that you use in the main.layout, for example change the ide of a string resource.
3. execute manual build (F6)
At this point VS hangs if there are issues related to build.
We are running an msbuild target after build is done, the idea is collect and detect the build errors related to changes in resources in order to notify it to designer.
This hang should be reproducible on a consistent manner.
I am able to reproduce this issue with XVS 220.127.116.115 by following the steps mentioned in comment 15 as shown in screencast : http://screencast.com/t/CARUs9iA0r
VS 2015 is hanging on build.
I have also checked it with latest build of Cycle 8 i.e. XVS 18.104.22.1689 and observed that this issue has been fixed as shown in screencast : http://screencast.com/t/jSnZV1CYs9
Hence closing this issue by marking it as Verified.
I tried switching to the beta channel twice now. That should install Xamarin 22.214.171.1245, but I always get "The cabinet file 'xamarin.cab' required for this installation is corrupt and cannot be used.".
Additionally after the setup failed like that, the old version is not available anymore either and I have to reinstall the whole Xamarin Platform.
At the 2nd try, I got a blue screen and now even after reinstalling Xamarin, VS claims that my iOS projects are incompatible and cannot be loaded.
As I also have my own work to do, I'll go back to my last backup now. I'll try another time and reopen this issue once it pops up in a newer release which actually installs.
Thanks @Michael for checking this issue at your end.
Please feel free to reopen it, if this issue is still not fixed for you.
Providing logs and test sample will be helpful to reproduce and fixed this issue.
That latest issue you are facing with the installer should be already fixed in current stable.
Please feel free to let us know if you're still getting that wrong behavior.
Hi @Jose Gallardo,
I'm still having this issue after upgraded to 126.96.36.1999, may I know what information you need here?
In reply to Comment 20,
Please file a new bug report for the issue you are seeing, being sure to include as many details as possible . Thanks in advance!