none
Excluding a subtree from all components' tree walks

    Question

  • Is there any way to take a directory tree and make it off-limits for automatic tree walks and file watches from any of the components of Visual Studio 2017?

    Situation:

    I'm developing an application in ASP.NET MVC Core with Ember for its client. Ember in turn uses Broccoli as its client build agent. Broccoli's build mechanism operates on an acyclical digraph of build steps. Each step has its own subtree in the Broccoli build. Each step transforms files from that step's input area to files in its output area. The Broccoli build then links or copies the files from that output area to the input areas of all the next steps in the digraph for the build. Links are a lot faster than copies and the link mechanism is not restricted to admins on [U|L].*x systems. On Windows, the build is often performed elevated so that the links can be performed. Copies will still work but builds that take a few seconds with links take minutes with copies.

    Issue experienced, workarounds, and issues with workarounds:

    If I nest my Ember project inside my Visual Studio project, I will get errors, slowdowns, and eventually solid hangs from the Visual Studio 2017 IDE. I can work around this by making my client code a separate TFS project, but then I cannot perform the Ember build inside the server build as a pre-build step. I cannot make an MSBuild project for it and establish a dependency relationship between the client and MVC build because the dependency will drag the client project into Visual Studio. No dependency means I can't get my client project to build on our TFS build server and inject its results into the server project. I'd actually have to build separately and then check the minified files into the www area of the server via TFS before submitting the server for each build. This has its own tedious problems.

    Hypothesis about root cause:

    Tree walks generally assume that the directory structure they are walking is in fact a tree and not an acyclical digraph, and may spend a lot of time "lost in the Broccoli forest" if links are used. According to File Explorer, the size of the tmp subtree is measured in hundreds of megabytes, but it takes a suspiciously long time to come up with that number, and that number might be completely invalid if the File Explorer is using a simple tree-walk. Worse, anything doing a filewatch of the entire tree under Visual Studio, like TFS, which already routinely hangs the IDE until it finishes whatever it is doing, will get inundated by the gazillions of file changes that occur in the tmp area on every client build.

    Question restated:

    How many places do I have to configure to tell Visual Studio 2017 (including TFS, Intellisense, MSBuild, other components) not to walk, watch, or otherwise interact in any way with the contents of the tmp subdirectory of my project? Are there any components that perform watches or tree walks that are not configurable to exclude named subtrees? Is there any project setting that acts as a universal cross-component "exclude"? If I can stabilize this integration, I can build my web application as a single project.

    Monday, February 13, 2017 10:42 PM

All replies

  • Hi Lupestr0,

    Thanks your posting.

    >> How many places do I have to configure to tell Visual Studio 2017 (including TFS, Intellisense, MSBuild, other components) not to walk…

    I’m still not sure what your real meaning here.

    TFS cannot be configured in Visual studio 2017. Intellisense and MSBuild could be set with no problem.

    >> Are there any components that perform watches or tree walks that are not configurable to exclude named subtrees?

    Based on my experience, I cannot find any components like those.

    >> Is there any project setting that acts as a universal cross-component "exclude"?

    I don’t think there is any.  

    Please feel free to let me know if I misunderstood it.

    Best regards,

    Fletch


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, February 14, 2017 5:58 AM
  • >> How many places do I have to configure to tell Visual Studio 2017 (including TFS, Intellisense, MSBuild, other components) not to walk…

    > I’m still not sure what your real meaning here.

    For TFS, when I add files to subtrees of my ASP.NET Core project or change files there, Visual Studio sometimes takes it upon itself to notice the change and try to add the file to source control. Maybe what I am seeing is Visual Studio's use of TFS rather than TFS itself. It isn't entirely clear to me precisely where one ends and the other begins.

    In any case, while it is sorting all this out, the IDE hangs with a spinner and I can do nothing else. Ember builds change hundreds of files in the tmp subtree, so the IDE can become nearly permanently frozen - many minutes or hours at a time. I will never be interested in checking in any file found there, regardless of its extension - most of them are JavaScript in various stages of transpilation and merging, so they look like "fair game" - and I want to be able to tell it not to even try.

    The tmp directory contains potentially hundreds of symbolic links among its subtrees. Anything that expects a directory tree to be a pure tree, traversing symbolic links to directories as if they were directories, can easily get lost, so I want Visual Studio not to look. Intellisense is always looking for files added, so it can build up information. MSBuild now uses wildcards rather than individual file inclusions, at least in ASP.NET Core projects, and hence walks subtrees looking for them.

    >> Are there any components that perform watches or tree walks that are not configurable to exclude named subtrees?

    > Based on my experience, I cannot find any components like those.

    That's a relief. That would be a showstopper for what I'm trying to do.

    >> Is there any project setting that acts as a universal cross-component "exclude"?

    > I don’t think there is any.  

    What are the set of places I need to configure in Visual Studio to tell it not to interact with a particular subtree?

    Many thanks...

    Thursday, February 16, 2017 7:01 PM
  • Hi Lupestr,

    According to your description, whether you need to change the permission in TFS, that some account from VS will cannot access it.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, February 17, 2017 8:36 AM
    Moderator