Xbyk Versioning
Does XbyK contains versioning wherein you can compare different versions side by side, same as Kenti
Environment
Xperience by Kentico version: [30.6.0]
.NET version: [8|9]
Execution environment: [SaaS|Private cloud (Azure/AWS/Virtual machine)]
Link to relevant Xperience by Kentico documentation
Answers
TLDR; Yes
Just like all distributed software, Xperience by Kentico has version numbers that are unique to every release. These are listed prominently in our Changelog and on the product roadmap.
This information is accessible in the administration UI by clicking on the "i" icon in the lower left of the administration UI.
This information is also available in several places within the code and data that runs the product.
In C# I can use reflection to get this information from the assemblies containing Xperience's types, for example if I define this minimal API endpoint in my Program.cs
I can quickly see what the current version of Xperience's assemblies are.
app.MapGet("/api/assembly-version", () =>
{
var assembly = typeof(PageBuilderOptions).Assembly;
var assemblyName = assembly.GetName();
return Results.Json(new
{
AssemblyName = assemblyName.Name,
Version = assemblyName.Version?.ToString(),
FullName = assemblyName.FullName,
Location = assembly.Location
});
});
This will return the following JSON
{
"assemblyName": "Kentico.Content.Web.Mvc",
"version": "30.8.0.0",
"fullName": "Kentico.Content.Web.Mvc, Version=30.8.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9",
"location": "<path-to>\\DancingGoat\\bin\\Debug\\net8.0\\Kentico.Content.Web.Mvc.dll"
}
I can also query the database using the IInfoProvider<SettingsKeyInfo>
service to retrieve the version number. Again, here's a minimal API endpoint example:
app.MapGet("/api/database-version", async (IInfoProvider<SettingsKeyInfo> settingsKeyProvider) =>
{
var settingsKey = await settingsKeyProvider.GetAsync("CMSDBVersion");
var cmsVersion = settingsKey?.KeyValue;
return Results.Json(new
{
CMSDBVersion = cmsVersion,
Key = "CMSDBVersion"
});
});
This will return a JSON result:
{
"cmsdbVersion": "30.8.0",
"key": "CMSDBVersion"
}
Why are there 2 ways to retrieve the version?
Well, the assembly version is obvious - all .NET .dll
files include a version number and our NuGet packages are all versioned so these numbers should match. This is the true version of the features and APIs the running Xperience by Kentico application.
However, the database version is the version of the data schemas. These can be different under specific circumstances, like when you've updated your NuGet packages after a hotfix or Refresh but have not yet run the dotnet run --kxp-update
command to update your local database.
Which version you would use to drive specific behavior in your application depends on what you are trying to accomplish.
You could also use both values, compare them, and use that as a case to handle in a special way like we do when there is a mismatch and you try to run your application.
Unhandled exception. System.NotSupportedException: The database version '30.8.0' does not match the project version '30.8.1', please check your connection string.
To answer this question, you have to login first.