Closed iainnicol closed 5 years ago
You can remove the Id element from the project to avoid this behaviour.
Thanks, but I'm not sure how to do that.
I think the block I pass to nuget_packs is given a config to modify. The nugets_pack task, and not me, instantiates both the project and the package: https://github.com/Albacore/albacore/blob/6f8dab6d65f441fd155fb59666416c0813fcd076/lib/albacore/task_types/nugets_pack.rb#L113-L117
No, I mean the csproj
project file. It has an Id
element in its XML that you can remove, IMO.
Unfortunately I don't think removing Id
from the csproj
is sufficient. If the Id
XML element is removed, I think the Albacore Project
class defaults to returning the project file's basename.
That said, I just realised I could add the Id to the csproj.
These lines cause metadata to be overwritten with data from the project file:
https://github.com/Albacore/albacore/blob/6f8dab6d65f441fd155fb59666416c0813fcd076/lib/albacore/nuget_model.rb#L483-L486
This is causing problems with my attempt to port DotNetZip to Albacore v3. The various NuGet packages should have different IDs, but I think the highlighted lines cause every package to have the same IDs, etc.
I presume Albacore should additionally check whether the
package.metadata.foo
fields are set. I realise that's an absolutely trivial change to make, but I barely know Ruby, so I don't know the idiomatic way to write it.