Hello I’ve noticed that when i build a octopack enabled solution multiple times, I see many .nupkg files in there. Its all files that I have created over the course of weeks and I just didn’t notice them. Is there a way to ensure that I keep only the latest .nupkg file?
Are you using a “*” in your project’s AssemblyVersion? If so this could be a side-effect. If not, can you please let me know what the versions of the packge files are?
To stop OctoPack running in a configuraiton, add:
To the .csproj’s properties for that configuration (e.g. Debug).
Hope this helps,
I am seeing this issue as well and I currently have the AssemblyVersion set to 188.8.131.52.
When I call msbuild, I am also passing in an OctoPackPackageVersion and an OctoPackPublishPackageToFileShare. It correctly packages it with the right version and to the right location I tell it, but is also leaving behind the nupkg file in the bin folder, which to me it should not do since I am telling it the location for where to put the file.
Any help on this would be much appreciated.
Thanks for getting in touch!
OctoPackPublishPackageToFileShare takes the created package and copies it to the specified location. It is to allow for placing your package in a shared location but we leave the created package in the local bin folder. We can’t assume that no one will want a local copy kept, so there is no cleanup after the file is copied.
Hope that helps!
Thanks for the clarification Vanessa. Maybe an option in the future to not keep the one in the bin folder would be great?
The only problem I’ve run into with the files being kept around is that when I call msbuild clean for the project, it cleans the build output files but does not clean those nupkg files since msbuild doesn’t seem them as part of the output.
Incidentally because of this, on our TeamCity build agents when they build new versions with each release, this leads to nupkg files building up inside the bin folder of the project.
Not a problem. I’ve created a UserVoice suggestion for this which you can vote and comment on here.
It means this will not get lost. OctoPack is however an Open Source project, and we do accept pull requests (for any motivated people stumbling on to this thread).
Thanks Vanessa. I forgot about how OctoPack is open source, so I just might have to add something in to handle this