`dotnet watch` support for Traversal projects (and solutions?)
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Is your feature request related to a problem? Please describe.
`dotnet watch` should support operations that are allowed at a solution/traversal level.
### Describe the solution you'd like
`dotnet watch build --project mysln.sln` results in MSbuild errors while calling the `GenerateWatchList` target - it should be possible for `watch` to work for any command that itself accepts a solution (or other container-ish thing), like
* test
* build
* publish
* etc
The error I see for my simple solution running under `dotnet watch build` is
```
dotnet watch β Error(s) finding watch items project file 'sdk-container-demo.sln'.
dotnet watch π¨ MSBuild output from target 'GenerateWatchList':
dotnet watch π¨ Restore complete (4.2s)
dotnet watch π¨ msbuild-versioning-sample net8.0 failed with 1 error(s) (0.0s)
dotnet watch π¨ C:\Program Files\dotnet\sdk\10.0.100\DotnetTools\dotnet-watch\10.0.100\tools\net10.0\any\DotNetWatch.targets(15,5): error MSB4018:
dotnet watch π¨ The "FileSetSerializer" task failed unexpectedly.
dotnet watch π¨ System.IO.IOException: The process cannot access the file 'C:\Users\chusk\AppData\Local\Temp\tmpsdm0fx.tmp' becaus
dotnet watch π¨ e it is being used by another process.
dotnet watch π¨ at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, Fil
dotnet watch π¨ eShare share, FileOptions options)
dotnet watch π¨ at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare
dotnet watch π¨ share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
dotnet watch π¨ at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare sha
dotnet watch π¨ re, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
dotnet watch π¨ at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, Fil
dotnet watch π¨ eShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
dotnet watch π¨ at System.IO.File.Create(String path)
dotnet watch π¨ at DotNetWatchTasks.FileSetSerializer.Execute()
dotnet watch π¨ at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
dotnet watch π¨ at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLogging
dotnet watch π¨ Context taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
dotnet watch π¨ multi-arch-sample net8.0 failed with 1 error(s) (0.0s)
dotnet watch π¨ C:\Program Files\dotnet\sdk\10.0.100\DotnetTools\dotnet-watch\10.0.100\tools\net10.0\any\DotNetWatch.targets(15,5): error MSB4018:
dotnet watch π¨ The "FileSetSerializer" task failed unexpectedly.
dotnet watch π¨ System.IO.IOException: The process cannot access the file 'C:\Users\chusk\AppData\Local\Temp\tmpsdm0fx.tmp' becaus
dotnet watch π¨ e it is being used by another process.
dotnet watch π¨ at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, Fil
dotnet watch π¨ eShare share, FileOptions options)
dotnet watch π¨ at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare
dotnet watch π¨ share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
dotnet watch π¨ at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare sha
dotnet watch π¨ re, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
dotnet watch π¨ at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, Fil
dotnet watch π¨ eShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
dotnet watch π¨ at System.IO.File.Create(String path)
dotnet watch π¨ at DotNetWatchTasks.FileSetSerializer.Execute()
dotnet watch π¨ at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
dotnet watch π¨ at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLogging
dotnet watch π¨ Context taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
dotnet watch π¨ aot-sample net8.0 failed with 1 error(s) (0.0s)
dotnet watch π¨ C:\Program Files\dotnet\sdk\10.0.100\DotnetTools\dotnet-watch\10.0.100\tools\net10.0\any\DotNetWatch.targets(15,5): error MSB4018:
dotnet watch π¨ The "FileSetSerializer" task failed unexpectedly.
dotnet watch π¨ System.IO.IOException: The process cannot access the file 'C:\Users\chusk\AppData\Local\Temp\tmpsdm0fx.tmp' becaus
dotnet watch π¨ e it is being used by another process.
dotnet watch π¨ at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, Fil
dotnet watch π¨ eShare share, FileOptions options)
dotnet watch π¨ at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare
dotnet watch π¨ share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
dotnet watch π¨ at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare sha
dotnet watch π¨ re, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
dotnet watch π¨ at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, Fil
dotnet watch π¨ eShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
dotnet watch π¨ at System.IO.File.Create(String path)
dotnet watch π¨ at DotNetWatchTasks.FileSetSerializer.Execute()
dotnet watch π¨ at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
dotnet watch π¨ at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLogging
dotnet watch π¨ Context taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
dotnet watch π¨
dotnet watch π¨ Build failed with 3 error(s) in 4.6s
dotnet watch π¨
dotnet watch β Fix the error to continue or press Ctrl+C to exit
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.