Reputation: 27348
I have solution with couple project and each project is built on tfs server and packed into separate nuget package.
When I run build on build server, new version of nuget packages are created and published. I used the same auto incremented version number for all packages.
Should I create new version of the package even if nothing has changed in that particular project?
Is there any tool or article that would help me to publish new packages only if the actual project (or mayne one of its dependencies) has changes? Does anyone did that?
EDIT:
In my solution I have projects ( * format project(references) -> Package Name
):
and shared version.txt.
when I change project C build on build server, all packages are repacked with version.txt on build server and published.
Then I have different solution, that consumes those packages.
Upvotes: 1
Views: 693
Reputation: 131
Since you can't consider you'll be able to pack the other projects whenever you want to pack one of them:
Can you consider that every time you want to create a specific project's nuget the other projects will be ready to be packed too? Or there will be, maybe, commited in progress development on the other projects. – Paulo Suassuna 55 mins ago
no, I can't consider that. – Liero 18 mins ago
You shouldn't create new versions of all projects every time you want to pack a solution's project. Instead, you should create always the one and only you want to pack. Also, I guess you're using project reference between solution's project. You shouldn't do that either, in that case, because you'll be referencing unstable versions of your projects. Example:
You want to nuget pack project B with a brand new check-in:
Actually, you should treat them as different products, so you should change them for nuget reference. That way, you guarantee you're a using a stable version of the other projects. Example
You want to nuget pack project B with a brand new check-in:
You may keep all projects under a single solution, but be sure to change the reference between them as NuGet reference.
Upvotes: 1