Closed hbjydev closed 5 years ago
Full traceback and error as reported by my editor:
Exception has occurred: CLR/System.IO.FileLoadException
An unhandled exception of type 'System.IO.FileLoadException' occurred in System.Private.CoreLib.dll: 'Could not load file or assembly 'Platform, Version=1.2.5.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'
at Shaolinq.DataAccessModelConfiguration..ctor()
at Shaolinq.Postgres.PostgresConfiguration.Create(String connectionString)
at ZshBot.Database.Connection..ctor(String connectionString) in /home/hayden/ZSHBot/ZshBot/Database/Connection.cs:line 10
at ZshBot.Program.<MainAsync>d__5.MoveNext() in /home/hayden/ZSHBot/ZshBot/Program.cs:line 42
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ZshBot.Program.Main(String[] args) in /home/hayden/ZSHBot/ZshBot/Program.cs:line 19
Hey! Make sure you have Platform.NET installed as well: https://www.nuget.org/packages/Platform.NET/
I just ran dotnet add ZshBot/ZshBot.csproj package Platform.NET
and tried re-running, but I got the same error.
Oh, hang on, it's not the same error.
Exception has occurred: CLR/System.IO.FileLoadException
An unhandled exception of type 'System.IO.FileLoadException' occurred in System.Private.CoreLib.dll: 'Could not load file or assembly 'Platform.Xml.Serialization, Version=1.2.5.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'
at Shaolinq.TypeBuilding.CachingDataAccessModelAssemblyProvider.AssemblyKey..ctor(Type dataAccessModelType, DataAccessModelConfigurationUniqueKey configurationUniqueKey)
at Shaolinq.TypeBuilding.CachingDataAccessModelAssemblyProvider.GetDataAccessModelAssembly(Type dataAccessModelType, DataAccessModelConfiguration configuration)
at Shaolinq.DataAccessModel.BuildDataAccessModel(Type dataAccessModelType, DataAccessModelConfiguration configuration)
at Shaolinq.DataAccessModel.BuildDataAccessModel[T](DataAccessModelConfiguration configuration)
at ZshBot.Database.Connection..ctor(String connectionString) in /home/hayden/ZSHBot/ZshBot/Database/Connection.cs:line 11
at ZshBot.Program.<MainAsync>d__5.MoveNext() in /home/hayden/ZSHBot/ZshBot/Program.cs:line 42
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ZshBot.Program.Main(String[] args) in /home/hayden/ZSHBot/ZshBot/Program.cs:line 19
You'll want this package too: https://www.nuget.org/packages/Platform.Xml.Serialization/
So I'm making a Discord bot using this ORM, with this code:
...calling it in Program.cs like this...
...and I get this error when trying to start it up.