https://github.com/timheuer/nuget-config-editor.git
A Visual Studio Code extension that gives you a friendly, table-based editor for NuGet nuget.config files โ no more fiddling with XML by hand! ๐
Edit package sources and package source mappings with a clear, accessible UI while preserving the intent of your original configuration when possible.
nuget.config package sources: add, edit, remove, enable/disable sources.nuget.config files.nuget.config file.nuget.config file in the Explorer and choose "Open With..." โ "NuGet Config Editor", or open the command palette (Ctrl+Shift+P) and run the command titled "NuGet: Open nuget.config editor".The extension contributes the following settings (available in Settings UI):
nugetConfigEditor.logLevel (string) โ Log level for the extension output (e.g. info, debug, error).nugetConfigEditor.preferVisualEditor (boolean) โ When true, open nuget.config files in the visual editor by default.nugetConfigEditor.preserveUnknownXml (boolean) โ Attempt to preserve unknown XML nodes/sections when saving changes.nuget.config XML file; review diffs in source control if you want to inspect XML edits.nuget.config files, use the file picker to choose which config to edit.preserveUnknownXml to reduce loss of unknown content.nugetConfigEditor.preserveUnknownXml to help keep unknown nodes/comments where possible.
nuget.config files may show limited round-trip fidelity for uncommon XML structures.Because this is a custom editor, if it is set as the default editor VS Code will render both editor views when showing file diffs, and you won't see the raw text diff. Switch to the Text Editor to view raw diffs. This is a known limitation of VS Code custom editor extensibility points: microsoft/vscode#138525.
Recommendation (add to workspace or user settings):
"workbench.editorAssociations": {
"{git}:/**/nuget.config": "default",
"nuget.config": "nugetConfigEditor.visualEditor"
}
If you'd like to contribute, please open issues or pull requests in this repository. Keep change sets focused and include tests where appropriate.
Love this project? Contributions, issues, and PRs are very welcome โ thanks! โค๏ธ
When developing locally, the repository provides watch/build scripts (see package.json).
Development quick-start:
# build webview and extension for development (watch mode)
npm run watch
# run tests
npm run test
# create a packaged VSIX (production build)
npm run package
See the repository license for details.