Giter Site home page Giter Site logo

Visual Studio 2019 (v16.9.4) becomes unresponsive when marking MVC views as content when the Views directory contains a large number of files about msbuild.sdk.systemweb HOT 3 CLOSED

czemacleod avatar czemacleod commented on May 23, 2024
Visual Studio 2019 (v16.9.4) becomes unresponsive when marking MVC views as content when the Views directory contains a large number of files

from msbuild.sdk.systemweb.

Comments (3)

bachratyg avatar bachratyg commented on May 23, 2024 2

You should try using globs directly instead of @(Items) when moving items from None to Content and refrain from using Remove whenever possible. That tends to be much faster at the cost of your project being a bit more verbose.

There is an issue with VS because internally globs are turned into regexes and that prevents short-circuiting of directory traversals (e.g. Views\** glob is matched against all files in node_modules\** even though the prefix is guaranteed to fail). AFAIK this will ship in VS 16.10. See dotnet/msbuild#2000

You can also try setting EnableDefaultNoneItems to false, then you can simplify your project to this:

  <PropertyGroup>
    <EnableDefaultNoneItems>false</EnableDefaultNoneItems>
  </PropertyGroup>
  <ItemGroup>
    <Content Include="App_Code\**;Content\**;Scripts\**;_app_offline.htm;appsettings.json;engineConfiguration.config;Global.asax;NLog.config;robots.txt" />
    <Content Include="Views\**" />
  </ItemGroup>

This has the side effect that by default no items will be added as None and you have to add them manually.

Note that this sdk is still very much a work in progress and may not support all features that the first-party sdks do (e.g. DefaultItemExcludes is not honored in some cases).

from msbuild.sdk.systemweb.

stevenvolckaert avatar stevenvolckaert commented on May 23, 2024

Thank you so much for your suggestions @bachratyg! I'll try them out and report back here.

from msbuild.sdk.systemweb.

stevenvolckaert avatar stevenvolckaert commented on May 23, 2024

I got this working several weeks ago, and none of my team members reported issues. Thank you @bachratyg for your help!

from msbuild.sdk.systemweb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.