Bug 18820 - Xamarin VS extension not compatible with Funnel
Summary: Xamarin VS extension not compatible with Funnel
Status: RESOLVED DUPLICATE of bug 17334
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 1.10.x
Hardware: PC Windows
: High blocker
Target Milestone: ---
Assignee: Dominique Louis
Depends on:
Reported: 2014-04-04 14:33 UTC by Nate Cook
Modified: 2014-04-24 00:57 UTC (History)
8 users (show)

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:

Description Nate Cook 2014-04-04 14:33:41 UTC
I have worked closely with the developer of Funnel and I can confirm that Xamarin is preventing the Visual Studio extension Funnel from working correctly. All of the projects in the solution are always loaded, even though Funnel tries to load only a subset of the projects. When I uninstall Xamarin the Funnel extension works as expected again.

Comment 1 Dimitri 2014-04-06 11:17:58 UTC

The visual studio extension Funnel sets the loading priority of solution projects depending on currently applied load filter. This leads to much shorter solution load and compilation times since only the projects required by the current task are loaded. It’s especially helpful with solutions containing large amounts of code, so that modularization can be applied within one single solution without the need of splitting a solution into several sln files (more information is available here: http://vsfunnel.com/#!/page_article).

As described by Nate, Funnel no longer works correctly if Xamarin is installed. If the solution load process is complete (in the IVsSolutionEvents.OnAfterOpenSolution callback), all projects are loaded or unloaded with the regard to the priority set by Funnel. But after that, all projects are forced to load by Xamarin. I suppose the Xamarin-VS-integration is iterating over all projects and is evaluating some project properties which leads to a performance penalty (since the most of the projects are not even loaded). 

Is there any way to prevent Xamarin-VS-integration from forcing all projects to load?

If not, can Xamarint-VS-integration check whether the project in question is loaded before processing it, the code for obtaining the project load status could look like the following:

// hierarchy is an IVsHierarchy instance
object loadStatus;
var hResult = hierarchy.GetProperty(itemID, (int)VsHierarchyPropID.ProjectUnloadStatus, out loadStatus);
if (Microsoft.VisualStudio.ErrorHandler.Succeeded(hResult))

I’ll be happy to support if you experience any difficulties in the implementation.

The problem does not occur with the Starter Edition, only if the Business Edition is used. The solution in question does not contain any Xamarin-specific projects, only plain C# and Web projects, it’s freely available here: http://sourceforge.net/projects/sharpdevelop/files/SharpDevelop%204.x/4.3/SharpDevelop_4.3.3.9663_Source.zip/.  I’m using the Xamarin alpha channel on VS 2013 and 2012.

In version 1.3.1 I implemented a workaround which unloads all projects after they were loaded by Xamarin, but this has a very heavy performance impact (in worst case the solution load time is nearly doubled).

Best regards,

Comment 2 scottarvin 2014-04-13 22:37:06 UTC
I would like to vote that this bug gets fixed.

I would very much like to use Funnel, but cannot because of the increased load times described. Instead of one solution that I can use Funnel to manage which projects are active, I must now use dozens of solutions with many projects duplicated between them, which makes their management more difficult.

Comment 3 Vinicius Jarina 2014-04-24 00:57:09 UTC
Hi Dimitri/Nate

We have already addressed a issue with Load/Unload project.

This is a dup of #17334.

Thank you for your report.

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