Skip to content

Commit

Permalink
added better dotnet watch fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nickwesselman committed Aug 4, 2020
1 parent 0d32e03 commit 45226be
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/helix-basic-aspnetcore/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
Workaround for 'dotnet watch' issue with referenced MVC projects.
https://github.com/dotnet/aspnetcore/issues/22219
-->
<Target Name="RazorWatch" BeforeTargets="_CoreCollectWatchItems" Condition="'$(DotNetWatchBuild)' == 'true'">
<Target Name="FixDotnetWatch" AfterTargets="_CoreCollectWatchItems">
<ItemGroup>
<RazorWatch Include="**\*.cshtml" />
<Watch Include="%(RazorWatch.FullPath)" />
<_WatchRelativePath Include="@(Watch)" Condition="'%(Identity)' != '%(Watch.FullPath)'" />
<Watch Remove="@(_WatchRelativePath)" />
<Watch Include="%(_WatchRelativePath.FullPath)" />
</ItemGroup>
</Target>
</Project>

0 comments on commit 45226be

Please sign in to comment.