AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
.net usn journaling filewatcher3/27/2023 ![]() If the goal is to watch both projects, create a custom project file configured to watch both projects: IntegrationTests/IntegrationTests.csproj.Custom watch projects can be created to handle different scenarios. csproj file: ĭotnet-watch isn't restricted to C# projects. To ignore specific files, add the Watch="false" attribute to an item's definition in the. ĭotnet-watch can be configured to ignore its default settings. Items can be specified individually or by using glob patterns. Content files: More items can be added to the watch list by editing the. ![]() Customize files list to watchīy default, dotnet-watch tracks all files matching the following glob patterns: The console output indicates the tests passed. ![]() Save the file.ĭotnet watch detects the file change and reruns the tests. Skipped: 0.įix the Product method code so it returns the product. Its output indicates that a test failed and that the watcher is awaiting file changes: Total tests: 2. In a command shell, navigate to the WebAppTests folder. Run tests using dotnet watchĬhange the Product method of MathController.cs back to returning the sum. The console output indicates that dotnet watch detected a file change and restarted the app. Make changes with dotnet watchįix the bug in the Product method of MathController.cs so it returns the product and not the sum: public static int Product(int a, int b) For example, running dotnet watch -project WebApp run from the root of the sample app will also run and watch the WebApp project. ![]() You can use dotnet watch -project to specify a project to watch. ![]()
0 Comments
Read More
Leave a Reply. |