We are building a system which comprises of multiple repositories. Some of them are common. This solution is built with .net technologies, nuget and jenkin server.
We are planning to introduce versioning. All binaries should have product version like Major.Minor.Patch.Build.
We will have a dedicated Nuget server on our CI server where we will publish our internal packages for common projects. And similarly, we will create a nuget server on developer's local machine.
Here is the problem scenario:
Support one developer is working on a long running feature branch. And this feature requires changes across multiple branches (including a common branch). The developer will create feature branch for both the repositories and start working on them.
Since we will have a job to build feature branch (whenever any commit is done or pull request is raised on CI server), CI server will create a nuget package on centralized nuget server for the common repository.
If the generated nuget package has the same version (as the previous one), it will replace the existing package.
So the version should be different. Either we can increment any part of the previous version, like build part Or we can append -featureName at the end of the version number. Which one should be preferred?
And if we do any of these two things on dev machine as well, the developer has to change the package reference every time he switches between branches. So, ideally, package generated on dev machine should replace the previous package. But in this case as well, the developers switches between branches, he will have to make sure to build the appropriate common package.
Please suggest any standard solution for this scenario.
Thanks in Advnace
Right-click the Packages folder in the project, and select Update. This will update the NuGet package to the latest version. You can double-click the Add packages and choose the specific version.
NuGet 4.3. 0+ supports SemVer 2.0. 0, which supports pre-release numbers with dot notation, as in 1.0.
We went with a pretty easy solution - this may have some limitations with a larger team that I am unaware of, but this is working for our small team.
Change the version in your .nuspec file to have the branch name. For example:
You get the point
When installing packages in the nuget packet manager check "allow pre-release" Delete or unlist nuget pre-release branch versions if needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With