tumtumtum / Shaolinq

ORM for .NET with full LINQ support for Postgres, Sqlite, MySql and SqlServer
Other
127 stars 19 forks source link

issue running under .net core 5.0 #110

Open almostEric opened 3 years ago

almostEric commented 3 years ago

This works fine on my local machine, var pgConfiguration = PostgresConfiguration.Create("ReportingServer", _postgresUrl, _postgresUserName, _postgresPassword,commandTimeout: 0); PostgresSqlDatabaseContextInfo contextInfo = (PostgresSqlDatabaseContextInfo)pgConfiguration.SqlDatabaseContextInfos[0]; contextInfo.ConnectionIdleLifetime = 300; contextInfo.ConnectionPruningInterval = 10; postgresModel = DataAccessModel.BuildDataAccessModel(pgConfiguration);

but when pushed to my server I get this error:

Method not found: 'System.Reflection.Emit.AssemblyBuilder System.AppDomain.DefineDynamicAssembly(System.Reflection.AssemblyName, System.Reflection.Emit.AssemblyBuilderAccess, System.String)'. at Shaolinq.TypeBuilding.DataAccessModelAssemblyBuilder.BuildAssembly(TypeDescriptorProvider typeDescriptorProvider, DataAccessModelConfiguration configuration) at Shaolinq.TypeBuilding.DataAccessModelAssemblyBuilder.GetDataAccessModelAssembly(Type dataAccessModelType, DataAccessModelConfiguration configuration) at Shaolinq.TypeBuilding.CachingDataAccessModelAssemblyProvider.GetDataAccessModelAssembly(Type dataAccessModelType, DataAccessModelConfiguration configuration) at Shaolinq.DataAccessModel.BuildDataAccessModel(Type dataAccessModelType, DataAccessModelConfiguration configuration) at Shaolinq.DataAccessModel.BuildDataAccessModel[T](DataAccessModelConfiguration configuration)

The last line where I call BuildDataAccessModel is where it crashes.

tumtumtum commented 3 years ago

Hi @almostEric. What version of .NET is your server running? Is it .NET core? Shaolinq hasn’t been updated to support .NET core yet 😓

almostEric commented 3 years ago

yeah, core 5.0. What is weird is it works ok locally. Any timeframe on an update?