Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dotnet watch excludes #10888

Merged
merged 2 commits into from
Jan 10, 2022
Merged

Add dotnet watch excludes #10888

merged 2 commits into from
Jan 10, 2022

Conversation

Skrypt
Copy link
Contributor

@Skrypt Skrypt commented Dec 15, 2021

To lighten the filewatcher process. It fixes the issue where it reports in the console that there are too many changes in a folder.

@@ -11,6 +11,11 @@
<Folder Include="Localization\" />
</ItemGroup>

<!-- Watcher include and excludes -->
<ItemGroup>
<Watch Include="**\*.cs" Exclude="Recipes\**;Assets\**;node_modules\**\*;**\*.js.map;obj\**\*;bin\**\*" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Include and Exclude attributes?
Include="**\*.cs" does it mean that they are not watched otherwise, but then the Exclude would be useless.
What about cshtml, liquid, ?

Copy link
Contributor Author

@Skrypt Skrypt Dec 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's because it requires an include and exclude to work. Else it complains about it missing an include so I added a value already present in the defaults. Here is the documentation about this : https://docs.microsoft.com/en-us/aspnet/core/tutorials/dotnet-watch?view=aspnetcore-6.0#customize-files-list-to-watch

So basically what you add in the Include is added on top of the defaults.

@sebastienros sebastienros merged commit 070a9c1 into main Jan 10, 2022
@sebastienros sebastienros deleted the skrypt/dotnet-watch-excludes branch January 10, 2022 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants