Open Kujawadl opened 7 years ago
Hi
Not sure I fully understand. Is it the output variables that are not beeing set properly and causing your build to fail on your NuGet task?
They're being set, but they're being set differently. Sometimes it sets AssemblyVersion, sometimes it sets AssemblyInformationalVersion, etc.
On Fri, May 19, 2017, 3:07 PM Martin Nilsson notifications@github.com wrote:
Hi
Not sure I fully understand. Is it the output variables that are not beeing set properly and causing your build to fail on your NuGet task?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BoolBySigma/UpdateAssemblyInfo/issues/16#issuecomment-302799278, or mute the thread https://github.com/notifications/unsubscribe-auth/AOPw_JOHO749H1BX6B6avG_VosKOop4Kks5r7faBgaJpZM4Ngyb2 .
Ok. When a file is updated an object is returned with file, fileversion and assemblyversion. The output variables are based on those values. If multiple files are updated the first object is used for output variables.
As the versions can differ between files depending on values defined in the assembly info files that could be the cause of the inconsistency.
AssemblyInformationalVersion should not be included though. Could you run a debug build and upload the log?
I am reworking the implementation.
Would you be willing to provide me with a scenario and input parameters where you get inconsistet results?
I've got about 15 or so builds that I'm using this task with.
I have a task in the release definitions that reads the assembly info and uses it to version the NuGet package for that build.
Some releases fail because AssemblyVersion isn't set. So I changed to use AssemblyFileVersion, which most of the builds seemed to have, but now other releases are failing because they have AssemblyFileVersionAttribute instead of AssemblyFileVersion.
The attributes that are set are always consistent within the same build, e.g. BuildA will always have AssemblyVersion but not AssemblyFileVersion, BuildB will always have AssemblyFileVersion but not AssemblyFileVersionAttribute, etc. However, they are not consistent between different builds.