Questions tagged [dotnet-watch]
11 questions
10
votes
3 answers
Dotnet watch run - Force reload on "rude edit" - .Net 6
I run web projects like this, during development:
dotnet watch run
The project/browser reloads when I make a change. Awesome!
However, sometimes I will be shown this:
Unable to apply hot reload because of a rude edit.
Do you want to restart your…

Kjensen
- 12,447
- 36
- 109
- 171
4
votes
0 answers
How can I get dotnet to show shorter stack traces?
I'm running .NET Core 3.1 on macOS, using the dotnet watch command line to run my web application and unit tests. When my app crashes, the stack trace is frequently so large that I can't see what actually went wrong:
Is there some way I can get the…

Dylan Beattie
- 53,688
- 35
- 128
- 197
3
votes
0 answers
Is it possible to add a delay to a dotnet watch command?
I am using dotnet watch command to get automatic reloading for my application and it works quite fine. The problem I encountered is that if I do run some other tool that does something similar there is some locking of resources that happens and one…

Ilya Chernomordik
- 27,817
- 27
- 121
- 207
2
votes
3 answers
ASP.Net crashing on dotnet watch command
I have been developing a website with ASP.Net and using "dotnet watch" to view progress as I go. Everything had been working fine, but today I updated VS and now whenever I make a change and save to view the change on the website, it gives me a…

Daniel Stephens
- 73
- 7
1
vote
0 answers
Dockerize a Blazor WASM Application with dotnet watch run
I'm trying to dockerize a Blazor WASM application, but I want to run the application using dotnet watch run for the local development environment.
the src code is the default Blazor WASM template, I've just moved the project folder into the src…

ddfra
- 2,413
- 14
- 24
1
vote
2 answers
Debug Multiple Microservices in Visual Studio
I have a solution which contains two microservices and an API gateway. While debugging, the solution requires to run again and again to get insights or fix bugs.
I have tried dotnet watch run but with this I can attach debugger to one project at a…

rashidali
- 330
- 1
- 5
- 16
1
vote
1 answer
How to tell dotnet watch to run a different build configuration?
Today I have a container running dotnet watch -v --project ".\\MyProject" run --no-launch-profile and the "MyProject" folder is mapped transparently to a .NET Core project of my solution. So whenever I alter a file in my Visual Studio it's picked up…

IvanL
- 2,475
- 1
- 26
- 39
1
vote
1 answer
What MSBuild property is set when dotnet-watch is used?
When running dotnet watch or dotnet watch test, is there a way to know inside of the csproj file that it's running in a watch mode so certain features can be turned on or off?

Daniel A. White
- 187,200
- 47
- 362
- 445
0
votes
0 answers
dotnet watch not working (Visual Studio Code on macOS)
I am able to get dotnet watch working with this simple case:
while(true)
{
Thread.Sleep(1000);
F();
}
void F()
{
Console.WriteLine("a");
}
Changing "a" to "b" and saving the file (while the app is still running) does what you'd expect…

Brian Birtle
- 627
- 7
- 15
0
votes
0 answers
Is it possible for dotnet watch to only build the changed ASP.NET project and not the projects it depended on?
I'm developing a Blazor application and I'm running dotnet watch on it for the hot module reload properties. It works great and fast when it is a standalone project, but after I introduced a DTO project and a client project as dependencies, it looks…

Jens Jensen
- 21
- 2
0
votes
1 answer
Can't launch dotnet-watch configuration in debug mode asp.net core 6 mac m1 Rider
On start up, it writes Cannot open assembly '/usr/local/share/dotnet/dotnet': File does not contain a valid CIL image..
I have two versions of platform installed: .net 6 and .net core 3.1. This is my launchSettings.json:
{
"iisSettings": {
…

Aliensis
- 85
- 1
- 8