1

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?

3
  • 1
    Could your kindly check the libray, it should be the best choice. Commented Apr 5, 2023 at 10:06
  • Thank you Jason you sent me in the right direction ... I added this to my 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>' Commented Apr 5, 2023 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. Commented Apr 6, 2023 at 5:36

1 Answer 1

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> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.