Setting version numbers on C# build within Rider Follow
Hey guys -
Is anyone aware of a built-in or plugin route to getting auto-incremented version numbers. I'm trying so-very-hard to make the switch to Rider from VS, but we have a policy of updating versions in the standard 126.96.36.199 (Major.Minor.Build.Version) terminology to make them visible for Windows users with the usual right-click -> Properties -> Details.
Right now I'm having to update AssemblyInfo.cs manually on every build, which is killing me softly :)
Any suggestions (other than "stop doing it") welcome!
Please sign in to leave a comment.
I know this is a bit late and the OP may very well have solved his problem by now but... Normally I set this up with a script on the build server and tag my sources with the version number when there's a successful build. Then I can tie something out in the field (on a desktop, device, webserver, wherever) to a specific commit, and write my failing test against the actual failing code. If it's already fixed in a later build, that's then very easy to detect. I don't care about version numbers on my machine, because those builds are ephemeral/transient/temporary/never going to be run by another living soul.
HOWEVER, I'm just messing about with Blazor, and I'd find it really useful to be able to pull a build number from an assembly to display on the page so I know that what I'm looking at is what I've built. (For this use case I could probably grab a GUID of one of my own types, since they change on every build, or get a hash of the assembly, or something.)
this I have been doing with the build version increment extension in VS but now need to recreate in rider. yes i can write something to manupulate the assembly file in a post build script hook but thought JB would have done something better already
nobody remembers to increment build numbers and frankly shouldn't have to. version major and minor - no problem the compiler doesnt know when you relase thiings but building is just building!
this and the lack of immediate window so I can just invove a method or something when paused are 2 things that are going to keep dragging me back to VS which I'd like not to do!
I'm not sure if there is an existing plugin for that, but one can develop it. There are a lot of articles and tutorials about how to create IntelliJ plugins:
Rider sample plugin
An article about Rider Frontend plugin development
Creating Your First Plugin
Here is a link to the plugin collection.
Moreover, we have a Slack channel where our plugin writers can ask Rider/R#/IJ developers. Just let me know if you want to be added there.