{"id":17274978,"url":"https://github.com/waf/runonsave","last_synced_at":"2025-08-22T00:34:23.838Z","repository":{"id":41893980,"uuid":"417122551","full_name":"waf/RunOnSave","owner":"waf","description":"A Visual Studio extension that can run commands on files when they're saved.","archived":false,"fork":false,"pushed_at":"2023-05-04T17:44:48.000Z","size":76,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-05-04T18:57:42.592Z","etag":null,"topics":["visual-studio","visual-studio-extension"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-14T12:31:51.000Z","updated_at":"2023-04-15T02:41:40.000Z","dependencies_parsed_at":"2022-08-11T20:30:59.675Z","dependency_job_id":null,"html_url":"https://github.com/waf/RunOnSave","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waf%2FRunOnSave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waf%2FRunOnSave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waf%2FRunOnSave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waf%2FRunOnSave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waf","download_url":"https://codeload.github.com/waf/RunOnSave/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219844668,"owners_count":16556483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["visual-studio","visual-studio-extension"],"created_at":"2024-10-15T08:55:09.955Z","updated_at":"2024-10-15T08:55:10.073Z","avatar_url":"https://github.com/waf.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Visual Studio Extension: Run On Save\n====================================\n\nA simple Visual Studio extension that runs a command (i.e. a command line application), whenever a file is saved in Visual Studio. Available for free on the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=WillFuqua.RunOnSave).\n\nThe command to be run is specified in a `.onsaveconfig` file, which has the same syntax and behavior as [.editorconfig files](https://editorconfig.org/).\n\nHere's an example `.onsaveconfig` file that calls [dotnet-csharpier](https://github.com/belav/csharpier) on C# files:\n\n```ini\n# run dotnet csharpier on C# files, whenever they're saved.\n[*.cs]\ncommand = dotnet\narguments = csharpier {file}\n```\n\nThe following options are supported:\n\n- **command** - the command to run. It should be either fully qualified or available on the Path environment variable. For `.cmd` and `.bat` files, make sure the file extension is included in the command. The following placeholder can be used in the command:\n  - `{solution_directory}` - The directory of the solution file (e.g. C:\\MySolution)\n- **arguments** - the arguments to supply to the command. It supports the following placeholders:\n  - `{file}` - The file that was saved, fully qualified (e.g. C:\\MySolution\\MyProject\\Program.cs)\n  - `{file_in_solution}` - The file that was saved, relative to the solution_directory (e.g. MyProject\\Program.cs)\n  - `{filename}` - The file name of the file that was saved (e.g. Program.cs)\n  - `{directory}` - The directory containing the file that was saved (e.g. C:\\MySolution\\MyProject)\n  - `{solution_directory}` - The directory of the solution file (e.g. C:\\MySolution)\n- **working_directory** - The working directory to run the command in. Defaults to the directory of the file that was saved.\n- **timeout_seconds** - How long to wait for the command to finish. Defaults to 30 seconds.\n- **always_run** - by default, RunOnSave only runs the command when the input file has changed (so repeatedly pressing ctrl-s will only call the command once). Set this to `true` to disable this behavior, so the command will always run. This may be required if you have additional extensions that also modify the file on save.\n\nSimilar to `.editorconfig`, specific files can be ignored by setting the command to `unset` or `ignore`:\n\n```ini\n[*.cs]\ncommand = dotnet\narguments = csharpier {file}\n\n[BigFile.cs]\ncommand = ignore\n```\n\nLogo by [icons8](https://www.visualpharm.com/free-icons/save-595b40b85ba036ed117da9ec).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaf%2Frunonsave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaf%2Frunonsave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaf%2Frunonsave/lists"}