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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
<RazorRuntimeCompilation>false</RazorRuntimeCompilation>
</PropertyGroup>

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

<ItemGroup>
<Folder Include="wwwroot\" />
<Folder Include="Localization\" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="$(TemplateOrchardPackageVersion)"
Condition="'$(RazorRuntimeCompilation)' == 'true'" />
Expand Down