newky2k / VersionChangerAddin

Visual studio addin to change solution version numbers
MIT License
23 stars 12 forks source link

new version doesn't work for nuget packages #31

Closed pmespace closed 10 months ago

pmespace commented 10 months ago

The extension used to allow setting versions with only 3 parts, it no longer allows it forcing the 4th part of the version to be set to something thus making the $(PackageVersion) variable in csproj not reflecting the REAL value of the version number.

as an example a version is set as follows <AssemblyVersion>7.6.6.0</AssemblyVersion> and $(PackageVersion) is then 7.6.6.0 while with the 2019 version it was possible to not use the 4th part resulting in a version which was compliant with the version indicated in the nuget package (which would be 7.6.6) making manipulate automatically the nuget package impossible

Could you please reinstate the version on 3 parts ?

newky2k commented 10 months ago

@pmespace have you tried turning off the revision number on the options tab? This is designed to turn of the 4th part of the version number specifically across the board.

Screenshot 2023-11-10 at 09 42 57

Screenshot 2023-11-10 at 09 43 09

Enabling SemVer2.0 forces this option too

eMuonTau commented 10 months ago

I didn't notice there is an Options tab too. 😅 I disabled revision but this time tool did not respect Version Update Options. If revision is enabled it only updates tags that defined in csproj file. But if you disable revision, even if you uncheck FileVersion, it creates a FileVersion tag.

newky2k commented 10 months ago

@eMuonTau Yeah that sounds like a bug!! I'll take a look and see if i can see what is causing it.

newky2k commented 10 months ago

@eMuonTau Found it, it doesn't look related to the "Enable Revision" checkbox, there is a typo in the bindings for some of the Version options which means it wasn't disabling FileVersion anyway.

eMuonTau commented 10 months ago

@newky2k Strange, When you enable revision it does not create FileVersion tag. I did a quick look to send a PR but did not notice any typo. I will check your commit to understand it better. Thanks for your efforts

pmespace commented 10 months ago

I must admit I downloaded the code and restarted from VS 2019 version to recreate a VS 2022 with all the details because I couldn't see anything @newky2k indicated in his first answer. I did it very quickly so I apologize for it. I will have a look at your last version see if it does it for me.

newky2k commented 10 months ago

@pmespace I haven't updated the 2019 version of the extension yet only the 2022 version. The new screen and settings are only available there currently, though i do plan to update the 2019 version soon.

@eMuonTau @pmespace version 4.1.0 of the VS 2022 extension should be available shortly

newky2k commented 10 months ago

@pmespace @eMuonTau 4.1.1 is now available for both VS 2019 and VS 2022.

Hopefully these new versions fix your issues.

pmespace commented 10 months ago

@newky2k thank you I'm going to give it a look this evening