07-21-2023, 05:54 PM
We have a scenario, where different teams work on different parts of a larger product. From time to time, all Visual Studio Projects of all Solutions there need to get some of their referenced NuGet packages updated. As a result of that update, all projects in the whole source tree should reference the same versions of the packages.
Is there a way to update a specific NuGet package to a specific version **in all projects** using some **automatic approach** like **PowerShell** scripts?
Edit:
Is there a way to somehow load the necessary parts of Visual Studio and NuGet to also **update the assembly references correctly**?
Example:
NuGetScript Update Solution.sln PackageName -version NewVersion
or
NuGetScript Update PathToProjects PackageName -version NewVersion
There are too many components to load all of them in Visual Studio and update them manually via package manager UI.
Is there a way to update a specific NuGet package to a specific version **in all projects** using some **automatic approach** like **PowerShell** scripts?
Edit:
Is there a way to somehow load the necessary parts of Visual Studio and NuGet to also **update the assembly references correctly**?
Example:
NuGetScript Update Solution.sln PackageName -version NewVersion
or
NuGetScript Update PathToProjects PackageName -version NewVersion
There are too many components to load all of them in Visual Studio and update them manually via package manager UI.