JonPSmith / EfCore.SchemaCompare

Library to compare EF Core's Model of the database against a database's schema.
https://www.thereformedprogrammer.net/how-to-update-a-databases-schema-without-using-ef-cores-migrate-feature/
MIT License
133 stars 16 forks source link

Error when integration with EF Core Power Tools #3

Closed ErikEJ closed 3 years ago

ErikEJ commented 3 years ago

I have no appsettings files, I provide a connection string.

Please let me know if you need additional info.

System.Exception: Did not find '\bin\' in the assembly. Do you need to provide the callingAssembly parameter? at EfSchemaCompare.Internal.AppSettings.GetCallingAssemblyTopLevelDir(Assembly callingAssembly) at EfSchemaCompare.Internal.AppSettings.GetConfiguration(Assembly callingAssembly, String settingsFilename) at EfSchemaCompare.CompareEfSql.GetConfigurationOrActualString(String configOrConnectionString) at EfSchemaCompare.CompareEfSql.CompareEfWithDb(String configOrConnectionString, DbContext[] dbContexts) at Modelling.EfCoreCompareBuilder.GetCompareResult(String outputPath, String startupOutputPath, String connectionString, String dbContext) in C:\Code\EFCorePowerTools\src\GUI\efpt50.core\EFCoreCompareBuilder.cs:line 41 at Modelling.Program.Main(String[] args) in C:\Code\EFCorePowerTools\src\GUI\efpt30.core\Program.cs:line 33

ErikEJ commented 3 years ago

This is my work in progress: https://github.com/ErikEJ/EFCorePowerTools/commit/917d827ce27d2ef85e08bbcba1c607688776624a

JonPSmith commented 3 years ago

Hi @ErikEJ,

I have fixed this and issued a new version. I knew what the problem is as its a feature from the unit test side, so it was easy to fine, BUT couldn't test it. I'm sure it will work but let me know if it didn't.

ErikEJ commented 3 years ago

Looking at your fix and the error call stack I am not convinced that this will work. Will let you know.

JonPSmith commented 3 years ago

The exception is a very specific one and comes from my TestSupport library, and I think I have fixed it, but do try it and see if it works.

ErikEJ commented 3 years ago

image

Success! Thanks.

ErikEJ commented 3 years ago

Need to iron out some issues but getting closer

ErikEJ commented 3 years ago

Included in latest daily build.