Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

VCFilter creation hangs with VS 2017 RC

$
0
0

I have a extension that manage VCFilter objects, and when porting to VS 2017 RC the creation of VCFilter objects seems to hang VS process

Here is the relevant code

 public VCFilter FindOrCreateFilter(VCFilter parent, string name)
{
    foreach(VCFilter f in parent.Filters)
    {
        if(f.Name.Equals(name))
        {
            return f;
        }
    }
    return parent.AddFilter(name);
}

It doesn't make VS hang all the time but it hangs after a few filters get created, In my extension this is being call from the Main thread and 

 	[External Code]>	IceBuilder.VS2017.dll!IceBuilder.VCUtilI.FindOrCreateFilter(Microsoft.VisualStudio.VCProjectEngine.VCFilter parent, string name) Line 47	C#
 	IceBuilder.VS2017.dll!IceBuilder.VCUtilI.AddGeneratedFiles(EnvDTE.Project dteProject, EnvDTE.Configuration config, string filterName, System.Collections.Generic.List<string> paths, bool generatedFilesPerConfiguration) Line 79	C#
 	IceBuilder.dll!IceBuilder.ProjectUtil.SetupGenerated(Microsoft.VisualStudio.Shell.Interop.IVsProject project, EnvDTE.Configuration configuration, string filter, System.Collections.Generic.List<string> files, bool generatedFilesPerConfiguration) Line 552	C#
 	IceBuilder.dll!IceBuilder.ProjectUtil.SetupGenerated(Microsoft.VisualStudio.Shell.Interop.IVsProject project, IceBuilder.IceBuilderProjectType type) Line 567	C#
 	IceBuilder.dll!IceBuilder.Package.BuildEvents_OnBuildBegin(EnvDTE.vsBuildScope scope, EnvDTE.vsBuildAction action) Line 790	C#

That is the stack when VS hangs. Full code for extension is available here https://github.com/zeroc-ice/ice-builder-visualstudio/blob/master/IceBuilder_Common/VCUtilI.cs#L47

Any ideas how to further debug this issue? and what could have change with respect to VCFilter creation.


Viewing all articles
Browse latest Browse all 4410

Trending Articles