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
dotnet watch run infinite loop not honoring exclude/remove config #27775
Comments
Thanks for contacting us. |
Any updates on this? I'd love to use I have a similar scenario as OP, but I'm using a |
This is affecting more users than it may appear. The problem is not constrained to |
Please forgive me that I'm still a newbie to the dotnet world, but I've been able to reproduce this issue in several use cases here(currently found in one Blazor project & one MVC API project both via dotnet version
It seems that two stackoverflow links are related to this.
May I ask is there any further update regarding whether in the next milestone this issue will be fixed? or any possibility prediction for this issue to be fixed in the up-coming official release of dotnet 6 on November this year(2021) if not earlier? |
this did the job for me: #31141 (comment) |
None of the suggestions here helped me, but I was able to figure out what's causing my css files to be included despite my protests using <ItemGroup>
<None Update="**/*.razor.css" Watch="false" />
</ItemGroup> Apparently dotnet includes a lot of groups of files in the watch by default. Unfortunately, this only partially solved my particular problem, as the build process is somehow ignoring the changes my pre-build target is making to the files. :/ Edit: Fixed that too. Make sure your sass build step targets before Blazor's css target <Target Name="SassCompile" BeforeTargets="ResolveScopedCssInputs"> |
Thanks @GravlLift this did the trick! My config to watch <ItemGroup>
<!-- extends watching group to include *.scss files & remove *.css -->
<Watch Include="**/*.scss" />
<None Update="**/*.css" Watch="false" />
</ItemGroup> |
Describe the bug
2 issues that seem related:
csproj
) not honored.scss
files in different folders cause the watch to rebuild infinitely.It looks like the build creates the
css
file, which is then watched and the cycle continues.To Reproduce
Repro project available here: https://github.com/johan-v-r/Blazor-Wasm-Watch-Repro
Further technical details
VS 2019 16.8.0 with .NET 5.0.100
Able to replicate on 3 different Windows 10 machines, and just with CLI & notepad
The text was updated successfully, but these errors were encountered: