I am encountering an error while attempting to create a database using the command line.
I am encountering an error while attempting to create a database using the command line.
To Reproduce Steps to reproduce the behavior:
- Clone the repository.
- Navigate to the dancinggoat folder.
- Run the command dotnet restore.
- Execute the command to install the database. (i.e, dotnet kentico-xperience-dbmanager -- -s "<sql_server_name>" -d "<database_name>" -a "<admin_password>" --hash-string-salt "<hash_string_salt>" --license-file "<license_file_path>")
- See error.
Expected behavior I expected the database to be installed successfully without any errors.
Additional context The error message I received is: "Error installing the database. Original message: Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory."
After encountering the error, the database is created but with database version '28.4.3'. While running the project, I am getting the exception: System.NotSupportedException: 'The database version '28.4.3' does not match the project version '29.3.3', please check your connection string.'
Environment
- Xperience by Kentico version: [29.3.3]
- .NET version: [6]
- Deployment environment: [SaaS|Azure|VM]
- Link to relevant Xperience by Kentico documentation
Answers
This appears to be an issue with your database server or connection.
Are you sure the database is actually created and there wasn't an existing older database already there?
It could also be an issue with the dotnet tool you are using to create the database.
The database is populated based on the version of the .NET tool in your Dancing Goat project. There is a tool configuration file under /DancingGoat/.config/dotnet-tools.json
which has a version number for the database tool used for the project. This version number should match the version number of the Xperience NuGet packages used by the Dancing Goat project.
The tool can be installed locally or globally.
If you don't actually have the Xperience database dotnet tool installed/restored locally you might actually be using a globally installed version which could be a different version than your ASPNET Core Dancing Goat project.
I encountered a similar issue when targeting an older SQL server. The database would be created but it resulted in an error and didn't complete the installation. I don't remember there being an error message indicating my SQL server was incompatible but installing the latest resolved it for me.
Mark, thanks for following up here and adding your experience.
We do have a list of systems requirements in our docs. If anyone finds any issues with what we have listed, send some documentation feedback on that page.
To answer this question, you have to login first.