0

Is it possible to setup a ASP.NET Core MVC Blazor project to hot reload another project containing a component library? I think I saw it working once or twice but in the majority of cases it does not seem to work out of the box. Can I control it? Tried without success. Any hints?

phuzi
  • 12,078
  • 3
  • 26
  • 50
mbr
  • 303
  • 1
  • 4
  • 14
  • 1
    [Could your kindly check the libray](https://stackoverflow.com/a/60868054/7687666), it should be the best choice. – Jason Pan Apr 05 '23 at 10:06
  • Thank you Jason you sent me in the right direction ... I added this to my project ... ' ' – mbr Apr 05 '23 at 14:51
  • Thanks for your feedback. I think it's the solution for your post. Could you summarzie it as answer below, it might help other forum users. – Jason Pan Apr 06 '23 at 05:36

1 Answers1

0

Found a solution for it. I added those watch statements to my .csproj file. Be aware of the Remove statements. Otherwise it could watch files from another project.

<ItemGroup>
    <Watch Include="..\..\Shared\UI\Web\TheComponentsComponents\*.csproj" /> 
    <Watch Include="..\..\Shared\UI\Web\TheComponentsComponents\**.razor" />
    <Watch Include="..\..\Shared\UI\Web\TheComponentsComponents\***.cs" />
    <Watch Remove="..\..\Shared\UI\Web\TheComponentsComponents\bin*" /> 
    <Watch Remove="..\..\Shared\UI\Web\TheComponentsComponents\obj**" /> 
</ItemGroup>
Bamdad
  • 726
  • 1
  • 11
  • 28
mbr
  • 303
  • 1
  • 4
  • 14