Skip to content

[Hot Reload] Running dotnet watch in WEBAPI template on the CLI will show an error "failed to read staticwebassets.development.json" due to missing file when NET11 Preview 2 is installed. #65550

@Chakolito

Description

@Chakolito

REGRESSION INFO: Worked in NET11 Preview 1 and NET 10/9/8

INSTALL STEPS

  1. Clean machine: Windows 25h2 x64
  2. Install SDK 11 Preview 2
  3. Add feed

REPRO STEPS

  1. Open CMD, create a Web API using following commands:
    md WebAPI
    cd WebAPI
    dotnet new webapi -controllers
    
  2. Run the app with dotnet watch.

Note

  1. It does not repro when run with dotnet run.
  2. It repros when using NET 10/9/8 framework while .NET 11.0 Preview 2 is installed.
  3. When tested on the .NET 11 Preview 1 where it does not repro, it has the same files as with the Preview 2 while also having an empty staticwebassets folder.

ACTUAL
Image

Image Image

Error Log
❌ Failed to read 'C:\Users\v-ctamayo\WebAPI\obj\Debug\net11.0\staticwebassets.development.json': Could not find file 'C:\Users\v-ctamayo\WebAPI\obj\Debug\net11.0\staticwebassets.development.json'.

Expected
No error will occur.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions