Aspnetcore: .razor files interfere with up-to-date-check in VS

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

Steps to reproduce:

  1. Create a Razor Components project
  2. F5 and see it load
  3. Stop debugging
  4. Edit one of the .razor files (e.g. change text or add some markup)
  5. F5

Expected:
markup changes should be rebuilt and shown in the browser

Actual:
Project is considered "up to date" and no rebuild happens. Old content shows in browser.

The .razor wildcard needs to be added here: https://github.com/aspnet/AspNetCore-Tooling/blob/master/src/Razor/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets#L262

Done area-blazor bug

Most helpful comment

In that case, it seems like a good workaround for people during Preview 4 is to add the following to their .csproj:

<ItemGroup>
    <UpToDateCheckInput Include="@(Content->WithMetadataValue('Extension', '.razor'))" />
</ItemGroup>

It seems to work for me. @danroth27, should we describe this workaround in the blog post? The dev experience is pretty bad without applying this workaround.

Do you agree this is safe, @rynowak?

All 5 comments

In that case, it seems like a good workaround for people during Preview 4 is to add the following to their .csproj:

<ItemGroup>
    <UpToDateCheckInput Include="@(Content->WithMetadataValue('Extension', '.razor'))" />
</ItemGroup>

It seems to work for me. @danroth27, should we describe this workaround in the blog post? The dev experience is pretty bad without applying this workaround.

Do you agree this is safe, @rynowak?

Yes, this is what we will do to fix the bug.

@SteveSandersonMS Yes, the developer experience during the last four hours starting with the Razor Components template was bad. It would have helped to get more visibility of your workaround.

Thanks for the workaround, though!

@tragetaschen For future reference, the list of known issues for .NET Core 3.0 can be found here: https://github.com/dotnet/core/blob/master/release-notes/3.0/preview/3.0.0-preview-known-issues.md

This will probably be fixed in internal builds of VS tomorrow. I think all that will be required here is to update to a newest master and try this out.

Was this page helpful?
0 / 5 - 0 ratings