Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HotReload files generated in a wrong path for MAUI Blazor projects #26762

Closed
abpiskunov opened this issue Jul 22, 2022 · 1 comment · Fixed by #26765
Closed

HotReload files generated in a wrong path for MAUI Blazor projects #26762

abpiskunov opened this issue Jul 22, 2022 · 1 comment · Fixed by #26765
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch Bug

Comments

@abpiskunov
Copy link
Contributor

Describe the bug

Looks like some path issues in the sdk that generate “staticwebassets.development.json”. In the sample MAUI blazor app staticwebassets.development.json is generated under “obj\Debug\net6.0-windows10.0.19041.0” folder however in VS project system we are using “IntermediateOutputPath” property to get the path and it returns “obj\Debug\net6.0-windows10.0.19041.0\win10-x64” in case of MAUI blazor app. Contents of that file also point to the path returned by “IntermediateOutputPath”:

{"ContentRoots":["Z:\test\maui\wwwroot\","Z:\test\maui\obj\Debug\net6.0-windows10.0.19041.0\win10-x64\scopedcss\bundle\"],"Root":{"Children":{"css":{"Children":{"app.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/app.css"},"Patterns":null},"bootstrap":{"Children":{"bootstrap.min.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/bootstrap/bootstrap.min.css"},"Patterns":null},"bootstrap.min.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/bootstrap/bootstrap.min.css.map"},"Patterns":null}},"Asset":null,"Patterns":null},"open-iconic":{"Children":{"FONT-LICENSE":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/open-iconic/FONT-LICENSE"},"Patterns":null},"font":{"Children":{"css":{"Children":{"open-iconic-bootstrap.min.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/open-iconic/font/css/open-iconic-bootstrap.min.css"},"Patterns":null}},"Asset":null,"Patterns":null},"fonts":{"Children":{"open-iconic.eot":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/open-iconic/font/fonts/open-iconic.eot"},"Patterns":null},"open-iconic.otf":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/open-iconic/font/fonts/open-iconic.otf"},"Patterns":null},"open-iconic.svg":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/open-iconic/font/fonts/open-iconic.svg"},"Patterns":null},"open-iconic.ttf":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/open-iconic/font/fonts/open-iconic.ttf"},"Patterns":null},"open-iconic.woff":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/open-iconic/font/fonts/open-iconic.woff"},"Patterns":null}},"Asset":null,"Patterns":null}},"Asset":null,"Patterns":null},"ICON-LICENSE":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/open-iconic/ICON-LICENSE"},"Patterns":null},"README.md":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/open-iconic/README.md"},"Patterns":null}},"Asset":null,"Patterns":null}},"Asset":null,"Patterns":null},"favicon.ico":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"favicon.ico"},"Patterns":null},"index.html":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"index.html"},"Patterns":null},"MauiBlazorApp1.styles.css":{"Children":null,"Asset":{"ContentRootIndex":1,"SubPath":"MauiBlazorApp1.styles.css"},"Patterns":null}},"Asset":null,"Patterns":[{"ContentRootIndex":0,"Pattern":"**","Depth":0}]}}

Looks like the logic generating that file needs adjustment and also should use “IntermediateOutputPath” to get the root folder for the file?.

To Reproduce

Create a MAUI Blazor app from a template and start debugging in VS. Open Index.razor.css and change some style - no reload happens and staticcss bundle file is not updated.

See this bug for more details https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1579640.

Exceptions (if any)

Further technical details

  • Include the output of dotnet --info
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
@abpiskunov abpiskunov added the Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch label Jul 22, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Jul 22, 2022
@danroth27
Copy link
Member

@mkArtakMSFT Is this on our plate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants