I have a simple training project open, but once I make any change and try to run it, it hangs (output follows). Sometimes, rebooting the computer seems to solve it, but only until I make another change...
dotnet watch π₯ Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload.
π‘ Press "Ctrl + R" to restart.
dotnet watch π§ Building...
Determining projects to restore...
All projects are up-to-date for restore.
C:\Software Projects\RadzenTraining\Controllers\ReportController.cs(238,13): warning ASP0019: Use IHeaderDictionary.Append or the indexer to append or set headers. IDictionary.Add will throw an ArgumentException when attempting to add a duplicate key. (https://aka.ms/aspnet/analyzers) [C:\Software Projects\RadzenTraining\RadzenTraining.csproj]
C:\Software Projects\RadzenTraining\Controllers\ReportController.cs(238,13): warning ASP0019: Use IHeaderDictionary.Append or the indexer to append or set headers. IDictionary.Add will throw an ArgumentException when attempting to add a duplicate key. (https://aka.ms/aspnet/analyzers) [C:\Software Projects\RadzenTraining\RadzenTraining.csproj]
CSC : error CS2012: Cannot open 'C:\Software Projects\RadzenTraining\obj\Debug\net8.0\RadzenTraining.dll' for writing -- 'The process cannot access the file 'C:\Software Projects\RadzenTraining\obj\Debug\net8.0\RadzenTraining.dll' because it is being used by another process.' [C:\Software Projects\RadzenTraining\RadzenTraining.csproj]
RadzenTraining -> C:\Software Projects\RadzenTraining\bin\Debug\net8.0\RadzenTraining.dll
dotnet watch π Started
warn: Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer[8]
The ASP.NET Core developer certificate is not trusted. For information about trusting the ASP.NET Core developer certificate, see https://aka.ms/aspnet/https-trust-dev-cert.
info: Microsoft.Hosting.Lifetime[14]
Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5000
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: C:\Software Projects\RadzenTraining
dotnet watch π₯ Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload.
π‘ Press "Ctrl + R" to restart.
dotnet watch π§ Building...
Determining projects to restore...
All projects are up-to-date for restore.
C:\Software Projects\RadzenTraining\Controllers\ReportController.cs(238,13): warning ASP0019: Use IHeaderDictionary.Append or the indexer to append or set headers. IDictionary.Add will throw an ArgumentException when attempting to add a duplicate key. (https://aka.ms/aspnet/analyzers) [C:\Software Projects\RadzenTraining\RadzenTraining.csproj]
CSC : error CS2012: Cannot open 'C:\Software Projects\RadzenTraining\obj\Debug\net8.0\RadzenTraining.dll' for writing -- 'The requested operation cannot be performed on a file with a user-mapped section open. : 'C:\Software Projects\RadzenTraining\obj\Debug\net8.0\RadzenTraining.dll'' [C:\Software Projects\RadzenTraining\RadzenTraining.csproj]
dotnet watch β³ Waiting for a file to change before restarting dotnet...
You seem to have some general issue with dotnet watch. There seems to be some other process which is currently accessing those files - check for your antivirus software and exclude the project directory.
I have a simple training project open, but once I make any change and try to run it, it hangs (output follows). Sometimes, rebooting the computer seems to solve it, but only until I make another change...
dotnet watch π₯ Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload. π‘ Press "Ctrl + R" to restart. dotnet watch π§ Building... Determining projects to restore... All projects are up-to-date for restore. C:\Software Projects\RadzenTraining\Controllers\ReportController.cs(238,13): warning ASP0019: Use IHeaderDictionary.Append or the indexer to append or set headers. IDictionary.Add will throw an ArgumentException when attempting to add a duplicate key. (https://aka.ms/aspnet/analyzers) [C:\Software Projects\RadzenTraining\RadzenTraining.csproj] C:\Software Projects\RadzenTraining\Controllers\ReportController.cs(238,13): warning ASP0019: Use IHeaderDictionary.Append or the indexer to append or set headers. IDictionary.Add will throw an ArgumentException when attempting to add a duplicate key. (https://aka.ms/aspnet/analyzers) [C:\Software Projects\RadzenTraining\RadzenTraining.csproj] CSC : error CS2012: Cannot open 'C:\Software Projects\RadzenTraining\obj\Debug\net8.0\RadzenTraining.dll' for writing -- 'The process cannot access the file 'C:\Software Projects\RadzenTraining\obj\Debug\net8.0\RadzenTraining.dll' because it is being used by another process.' [C:\Software Projects\RadzenTraining\RadzenTraining.csproj]
RadzenTraining -> C:\Software Projects\RadzenTraining\bin\Debug\net8.0\RadzenTraining.dll dotnet watch π Started warn: Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer[8] The ASP.NET Core developer certificate is not trusted. For information about trusting the ASP.NET Core developer certificate, see https://aka.ms/aspnet/https-trust-dev-cert. info: Microsoft.Hosting.Lifetime[14] Now listening on: https://localhost:5001 info: Microsoft.Hosting.Lifetime[14] Now listening on: http://localhost:5000 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: C:\Software Projects\RadzenTraining dotnet watch π₯ Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload. π‘ Press "Ctrl + R" to restart. dotnet watch π§ Building... Determining projects to restore... All projects are up-to-date for restore. C:\Software Projects\RadzenTraining\Controllers\ReportController.cs(238,13): warning ASP0019: Use IHeaderDictionary.Append or the indexer to append or set headers. IDictionary.Add will throw an ArgumentException when attempting to add a duplicate key. (https://aka.ms/aspnet/analyzers) [C:\Software Projects\RadzenTraining\RadzenTraining.csproj] CSC : error CS2012: Cannot open 'C:\Software Projects\RadzenTraining\obj\Debug\net8.0\RadzenTraining.dll' for writing -- 'The requested operation cannot be performed on a file with a user-mapped section open. : 'C:\Software Projects\RadzenTraining\obj\Debug\net8.0\RadzenTraining.dll'' [C:\Software Projects\RadzenTraining\RadzenTraining.csproj] dotnet watch β³ Waiting for a file to change before restarting dotnet...
Cheers Reg