Xojo2023r3: app.ShortVersion showing as deprecated item

I have the following code:

Var versionString as String = app.ShortVersion + "." + app.NonReleaseVersion.ToText

When running Analyze menu on the page having this code I get the warning “ShortVersion is deprecated.” The help menu shows reference to ConsoleApplication.ShortVersion with deprecated warning. I work on web app. I see in help WebApplication entry with list of properties, the ShortVersion is not listed. I have figured out that the value pair ShortVersion=4.0 exists in the MyProject.xojo_project file.

I am now confused. Is the ShortVersion deprecated warning legitimate or not?
Since this app was designed originally in Xojo2018 I understand that parts may be deprecated and should be replaced. What should I do then with something like ShortVersion?

ShortVersion as String was deprecated on Deskop and Console in favor of Version as String. If you look at the Shared build settings in your project, you should see that the field is now labeled “Version”.

Anthony, sorry if I didn’t mention, I am working on web app. The confusion comes from the fact that ShortVersion name/value pair exists in .xojo_project file and I can’t find it anywhere else to set, hence I am assuming the code App.ShortVersion is legitimate yet the Analyze menu lists the “deprecated item” warning. Anyway, I have decided to just ignore this particular warning and move on with the conversion, just documented it on our wiki for reference. Thanks.

Sorry, the way I wrote made it seem like Web was excluded from this change. It’s not. WebApplication also uses Version as String now. See the documentation. I tend to think of Web as a console target in regards to things like this.

You are not alone, the mess created by the “API 2” (Renaming things with no benefits) will affect devs for YEARS, especially with the current state of the docs that dont reflect what was named before the change.

kind of yes, it is deprecated in the sense that now you have to use the renamed property that is the same just with another name :man_facepalming:t2:

Just replace ShortVersion with Version

The documentation is a mess, sometimes can create more confusion.

I’m not arguing with this statement, but the property listing of the class does show that there is no ShortVersion as String while there is a Version as String. That’s my one and only point with the statement I made. Perhaps I should be more clear in the future.

Ivan, thanks, you made me smile again - have a happy Friday!

The values within the file may not match your expectations in code or the IDE’s user interface. See aforementioned reference to API changes for the cause.

ShortVersion is deprecated but not removed, so it is still valid but it is recommended that you begin using the new property naming in your code to avoid problems if/when the deprecated version is removed.