Aspnetcore: [Blazor] Auto build on Save is not working

Created on 4 Mar 2019  路  5Comments  路  Source: dotnet/aspnetcore

Describe the bug

When I save a page (.cshtml file) a build is not automatically triggered, causing changes to not be visible when manually refreshing in the browser.

It works as expected if I manually trigger the build.

To Reproduce

Steps to reproduce the behavior:

  1. Install Blazor 0.8.0 and Visual Studio 2019 Preview 4
  2. Create a new Blazor project using the template under ASP.NET Core Web Application and ASP.NET Core 3.0.
  3. Run using CTRL+F5
  4. Change something in PagesIndex.cshtml, and save.
  5. Refresh the browser - Nothing changes

Expected behavior

A build should automatically be triggered so changes will be visible in the browser when refreshing.

Additional context

This used to work in Blazor 0.7.0 and Visual Studio 2017.

Details:
Microsoft Visual Studio Enterprise 2019 Preview
Version 16.0.0 Preview 4.0
VisualStudio.16.Preview/16.0.0-pre.4.0+28625.133

ASP.NET Core Blazor Language Services 0.8.0-preview-19104-04

area-blazor

Most helpful comment

@SteveSandersonMS : Thanks for the information, at least then I can stop searching and wondering why it suddenly wasn't working. I was sure it was a bug, since I couldn't find anything mentioning the feature would not be available going forward.

I hope the feature will be introduced in VS 2019 as well.

All 5 comments

Thanks for reporting this.

Currently this is expected behavior. We have not yet done the work to migrate the auto-rebuild feature forwards to VS2019.

@SteveSandersonMS , do we have a tracking issue for that work?

@SteveSandersonMS : Thanks for the information, at least then I can stop searching and wondering why it suddenly wasn't working. I was sure it was a bug, since I couldn't find anything mentioning the feature would not be available going forward.

I hope the feature will be introduced in VS 2019 as well.

Is this related to this: https://github.com/aspnet/AspNetCore/issues/4567 ?
Because all of the sudden reloading my razor pages in my browser isn't doing anything after file changes to my c# files (page models). I'm using ASP.NET Core 2.2.

Just to prove to myself that I hadn't gotten crazy I created a new default ASP.NET Core 2.1 Razor Pages webapp and that one works as expected.

What do you I need to do in order for getting my 2.2 app working? I'm using VS2018 btw, v 15.9.10.

@spacecat I don't know exactly what's going on in your 15.9 project, what versions of packages you're using, etc., but please note that all ongoing development is on ASP.NET Core 3.0 and requires VS2019 (currently in preview). It will be worth moving to that to keep access to the latest features, even though it doesn't yet include autorebuild.

Was this page helpful?
0 / 5 - 0 ratings