Closed begerard closed 4 months ago
I managed to solve this copying the efbundle.exe file to the /bin/Release directory. It's a workaround and maybe there is a better solution. Hope this help. Greets.
Oh, so it's path related? Good to know thanks.
I have found another work around, excluding Serilog code from executing during bundle execution thanks to the EF.IsDesignTime static property. It is set at true by the bundle.
This appears to be an EF problem rather than one specific to this project.
Description When I execute (both localy and on the CD) the "efbundle.exe" generated by entity framework with the new version of serilog-astpnetcore (7.0 instead of 6.1), I have this error:
The application itself works perfectly, only the bundle crash on startup. When I revert the update, it works again for the bundle.
Reproduction Here the Serilog configuration in Program.cs:
The configuration in appsettings.json:
Expected behavior I don't know how the EF bundle works internaly, it may be a bit strange around the loading of the appsettings but eventually it doesn't really need the complex configuration from the appsettings (files + ES server), so even a silent error (which may be how it works in 6.1) is ok for me.
Relevant package, tooling and runtime versions I use .Net 7.0 and these serilog packages:
A test without them still give me a crash for the bundle.
Additional context