I am interested to run dotnet watch test when opening a solution with my unit tests in visual studio 2017. Is there a way to run that just after the solution is open without doing it manually?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Visual Studio Task Runner can run any arbitrary CMD command when a project/solution is opened.
Prerequisites: Command Task Runner extention.
Add
Foo.cmd
with a target command to your project havingdotnet watch
package installed. It could have one line of code:Make sure the file is properly encoded to UTF-8 without BOM.
After
Command Task Runner
extention install,Add to Task Runner
option should be accessible from context menu of*.cmd
files. Press it and choose per-project level. As a result,commands.json
should appear in the project.Go to VS
View -> Other Windows -> Task Runner Explorer
. Set up the binding for theFoo
command in the context menu:Bindings -> Project Open
(the window refresh could help to see a recently added command).Re-open the solution and check a command execution result in
Task Runner Explorer
.How it could look: