-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsarea-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing one
Milestone
Description
dotnet watch is meant to identify files in referenced projects that should trigger a refresh. This does work correctly for .cs files, but not for .razor files.
Repro
Using .NET Core 3.1.300 (on Mac, but probably is the same on other platforms):
dotnet new blazorwasm --hosted -o MyAppcd MyAppdotnet watch -p Server --list
Expected result: Lists the files (including .razor files from the Client project)
Actual: Gets the paths wrong. Output is:
path/MyApp/Server/Pages/Error.cshtml
path/MyApp/Server/Pages/Shared/_Layout.cshtml
path/MyApp/Server/Controllers/WeatherForecastController.cs
path/MyApp/Server/Pages/Error.cshtml.cs
path/MyApp/Server/Program.cs
path/MyApp/Server/Startup.cs
path/MyApp/Server/MyApp.Server.csproj
path/MyApp/Server/App.razor
path/MyApp/Server/Pages/Counter.razor
path/MyApp/Server/Pages/FetchData.razor
path/MyApp/Server/Pages/Index.razor
path/MyApp/Server/Shared/MainLayout.razor
path/MyApp/Server/Shared/NavMenu.razor
path/MyApp/Server/Shared/SurveyPrompt.razor
path/MyApp/Server/_Imports.razor
path/MyApp/Client/Program.cs
path/MyApp/Client/MyApp.Client.csproj
path/MyApp/Shared/WeatherForecast.cs
path/MyApp/Shared/MyApp.Shared.csproj
Notice Server/Pages/Counter.razor? This should be Client/Pages/Counter.razor. I'm not sure how it's computing these incorrect paths to non-existent files.
Also if you try editing and saving one of the Client/**/*.razor files, dotnet watch won't respond.
nickwesselman
Metadata
Metadata
Assignees
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsarea-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing one