Closed bartoszluka closed 1 year ago
Quick solution would be to discard everything after the plus when parsing the version. I can open a PR with the fix if this satisfies you
var installedVersion = new Version(version.Split('+').First());
It seems at some point (probably 0.26.0) the action I use to publish to nuget started including the commit hash on the version number. There are 3 extensions that would need to be updated so I'll just republish a version 0.26.2 without the commit hash.
It is probably worth still updating the 3 extensions just in case this happens again, and to help anyone that doesn't update to 0.26.2.
I take that back, it isn't the action adding it. dotnet pack
is now including the commit hash in the nuspec, and dotnet csharpier --version
is now including the commit hash after the version number. It isn't clear how to prevent that.
If you open a PR for VS I can get that published. And I'll take care of VSCode and Rider later today. Thanks!
It turns out the rider and vscode are okay for now with the +hash version, so I went ahead and updated VS. I'll be on vacation in a few hours and wanted to get this out before then. Version 1.4.8 should be out shortly. I'm gonna leave this open so I can get rider and vscode to also trim off everything after the + when dealing with csharpier versions.
I can confirm that it solved the issue, thank you!
When initializing
csharpier
in the VisualStudio extension, there is aFormatException
thrown and logged. I traced it back to the this line. Since0.26.0
versions also contain something after the numbers, which breaks the extension.I confirmed it by running