NuGetSolver is a new experimental Visual Studio extension that automates resolving complex NuGet dependency conflicts, such as NU1605, NU1701, NU1107, and NU1202 warnings or errors in VS2022 for solutions. Please check here for more information. Features • Generates recommendations on how to change versions to resolve dependency conflicts in solutions. • View suggested changes before you apply or cancel the operation. • Toggle "Show only changes" to see all direct dependencies or just changes. • Toggle "Include prerelease" to include stable or preview versions in calculations. • Copy suggestions to the clipboard. Usage You can run the tool from the “Solution Explorer”. After a brief calculation to determine if it can generate suggestions, the tool displays the differences between the current and suggested states. If the recommended suggestion looks satisfactory, click "Apply fix" and try rebuilding the solution to check if the dependency conflicts are resolved. You can run the tool even if your solution doesn't have any dependency conflicts at the moment. It will upgrade your dependencies while keeping the changes minimal. Requirements: • VS 2022 is required. • This tool requires an internet connection to function properly, as it needs to retrieve available versions of packages in the solution from nuget.org and download the cache database file from our cache hosting service. Usage Recommendations and Known Constraints: • Only the nuget.org feed (https://api.nuget.org/v3/index.json) is supported. Please ensure that your sources in the nuget.config file for your solution resemble the following:
• Multi-feed and local package feeds are not supported yet. • Multi-targeting is not fully supported; the tool may generate a fix, but it might not work for all target frameworks. • 'Apply Fix' doesn't fully support updating versions if custom msbuild logic is used for setting the version. You may need to manually update the versions. • Central Package Management (CPM) is not fully supported; the tool can generate fixes, but you may need to manually update the versions in the Directory.Packages.props file. • The tool may not consider all available Preview versions when "Include prerelease" is toggled during suggestion calculations. • For packages.config or legacy-sdk style projects, it can generate suggestions, but cannot apply the fix directly. You may need to apply the fix manually. • NuGetSolver may resolve compile-time dependency conflicts, but runtime errors could still occur. • Currently, NuGetSolver does not verify if suggested versions have known vulnerabilities. As a result, it might recommend a version with known vulnerabilities. Please manually validate the versions for potential vulnerabilities if necessary, using resources like GitHub advisories. • Does not add a new direct dependency or promote any transitive dependencies to direct dependencies to resolve conflicts. Feedback This is currently in an experimental phase, and we would greatly appreciate any feedback you have! Please rate the extension and provide comments on the VS Marketplace. If there are any problems with this extension, check Visual Studio Developer Community for existing issues. For new issues, let us know via the Report a Problem option found in your favorite IDE under Help > Report a Problem. |