首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Dotnet监视挂在blazor web组装项目上

Dotnet监视挂在blazor web组装项目上
EN

Stack Overflow用户
提问于 2022-01-01 13:41:41
回答 2查看 778关注 0票数 4

我创建了一个这样的项目:

dotnet new blazorwasm -f net6.0

我是以下列方式执行这个项目的:

dotnet watch run

每当我保存一些应该触发重建的东西时,改变就会被认可,但什么也不会发生。我只得到以下信息,仅此而已:

watch : File changed: /Path/to/File.example.

它工作了一段时间后突然停了下来。

全部产出:

代码语言:javascript
复制
watch : Project supports hot reload and was configured to run with the default run-command. Watching with hot-reload
watch : Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload. Press "Ctrl + R" to restart.
watch : Building...
watch : Started '/usr/local/share/dotnet/dotnet' '' with process id 3155
  Determining projects to restore...
  All projects are up-to-date for restore.
  waveshape -> /Users/example/Projects/waveshape/bin/Debug/net6.0/waveshape.dll
  waveshape (Blazor output) -> /Users/example/Projects/waveshape/bin/Debug/net6.0/wwwroot
watch : Process id 3155 ran for 3605ms
watch : Running MSBuild target 'GenerateWatchList' on '/Users/example/Projects/waveshape/waveshape.csproj'
watch : Started '/usr/local/share/dotnet/dotnet' '' with process id 3164
watch : Process id 3164 ran for 557ms
watch : Watching 28 file(s) for changes
watch : dotnet-watch is configured to launch a browser on ASP.NET Core application startup.
watch : Configuring the app to use browser-refresh middleware.
watch : Refresh server running at wss://localhost:61209,ws://localhost:61210.
watch : HotReloadProfile: BlazorWebAssembly.
watch : Started 'dotnet' '"/Users/example/.nuget/packages/microsoft.aspnetcore.components.webassembly.devserver/6.0.1/build/../tools/blazor-devserver.dll" --applicationpath "/Users/example/Projects/waveshape/bin/Debug/net6.0/waveshape.dll"' with process id 3173
watch : Running dotnet with the following arguments: run
watch : Started
watch : Waiting for a browser to connect
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: https://localhost:7081
watch : Launching browser.
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://localhost:5236
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /Users/example/Projects/waveshape
watch : File changed: /Users/example/Projects/waveshape/Pages/Index.razor.
EN

回答 2

Stack Overflow用户

发布于 2022-08-04 19:51:48

我有这个问题,当http端口“错误”时可以复制。我不知道为什么这是“错误”,但端口5220我有完全相同的问题,但当我改变到5180,它的工作。

端口更改必须在launchSettings.json文件中完成。

有人创造和问题,但还没有得到回应。

票数 1
EN

Stack Overflow用户

发布于 2022-01-10 12:01:50

试着

  1. dotnet watch --project .\ProjectName.csproj -v
  2. dotnet watch --project . -v

如果你看到

代码语言:javascript
复制
watch : Hot reload capabilities: Baseline.

它应该能正常工作。

这是一个解决办法,因为热重装有问题。其他人也有问题-- https://github.com/dotnet/aspnetcore/issues/38036

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70549245

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档