Fix #3604 - display message if user is attempting to run the application prior to performing a full compilation

This commit is contained in:
sbwalker 2024-01-04 16:40:15 -05:00
parent f75179b2f6
commit 3dc28c7291

View File

@ -216,6 +216,8 @@ namespace Oqtane.Infrastructure
// get database type
var type = Type.GetType(databaseType);
if (type != null)
{
// create database object from type
var database = Activator.CreateInstance(type) as IDatabase;
@ -231,6 +233,12 @@ namespace Oqtane.Infrastructure
result.Success = true;
}
}
else
{
result.Message = $"The Database Provider {databaseType} Does Not Exist. If This Is A Development Environment Please Ensure You Have Performed A Full Compilation Of All Projects In The Oqtane Solution Prior To Running The Application.";
_filelogger.LogError(Utilities.LogMessage(this, result.Message));
}
}
catch (Exception ex)
{
result.Message = "An Error Occurred Creating The Database. This Is Usually Related To Your User Not Having Sufficient Rights To Perform This Operation. Please Note That You Can Also Create The Database Manually Prior To Initiating The Install Wizard. " + ex.ToString();