using MsbuildAnalyzer.Models; namespace MsbuildAnalyzer.Utilities; /// /// Watch target creation methods for TargetBuilder. /// public static partial class TargetBuilder { private static void AddWatchTarget( Dictionary targets, string fileName, PluginOptions options) { targets[options.WatchTargetName] = new Target { Command = "dotnet watch", Options = new TargetOptions { Cwd = "{projectRoot}" }, DependsOn = [options.RestoreTargetName], Cache = false, Continuous = true, Metadata = new TargetMetadata { Description = "Watch for changes and rebuild/rerun the .NET project", Technologies = ProjectUtilities.GetTechnologies(fileName) } }; } }