Merge pull request #3613 from sbwalker/dev

Fix #3604 - display message if user is attempting to run the application prior to performing a full compilation
This commit is contained in:
Shaun Walker
2024-01-04 16:40:36 -05:00
committed by GitHub

View File

@ -216,6 +216,8 @@ namespace Oqtane.Infrastructure
// get database type // get database type
var type = Type.GetType(databaseType); var type = Type.GetType(databaseType);
if (type != null)
{
// create database object from type // create database object from type
var database = Activator.CreateInstance(type) as IDatabase; var database = Activator.CreateInstance(type) as IDatabase;
@ -231,6 +233,12 @@ namespace Oqtane.Infrastructure
result.Success = true; 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) 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(); 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();