What controls the Specific Version property of a link in a NuGet package?

We have many libraries that are built in CI that deploy preleases every time they build. Other projects depend on them and automatically update them during assembly.

But the links are set using Specific Version = true, which means that increasing the version number in these DLLs leads to a build failure.

How can I control the setting of a property?

+5
source share
1 answer

You cannot change the behavior of NuGet without changing its source code. NuGet will always set SpecificVersion to true when adding a non-GAC assembly from Visual Studio.

To fix links or change them manually, you will need to run some kind of post-construction script.

Not sure exactly how you update projects on your CI server. If you use NuGet.exe update project.csproj , it will be updated to the latest NuGet package and will not set the SpecificVersion to true. However, the command line application does not support PowerShell scripts or content files, only links will be updated. It also assumes that an update is available, otherwise the link will not be changed.

+4
source

Source: https://habr.com/ru/post/1232616/


All Articles