Injecting DbContextFactory causes build to fail

Using Visual Studio I'm able to inject a DbContextFactory into my application and it works. RBS build fails. If I comment-out the injection, the build succeeds.

The only error is "Exception has been thrown by the target of an invocation", and the logfile shows no errors. Is there any way to get more detailed information from the exception?


SOLVED: The model was in a separate project. Once the model was moved into the main project, the project builds properly. While this isn't "ideal", it works and I can now move forward.

Getting the infamous Oh, no!, along with the stack trace on a page. It appears that there is an issue with my context, though it works with VS. Here's the trace:

image

Hi @BlazorSaddles,

Can you provide more details? Where do you inject the DBContextFactory and how do you use it? Also does the application run as expected outside of RBS? If possible you can send us your app to info@radzen.com (remove any bin and obj directories to keep the zip small).

I'll be sending a zip. There is a Readme.txt at the root of the solution with the details of the app.

Hi @BlazorSaddles,

Did you send us your project? I am asking as we didn't get anything yet. If yes - the zip size is probably beyond our mail provider attachment limit - you can host it in google drive, one drive or any of the like instead.

UPDATE: Found the app in the spam folder! Will post updates when I get to it.

Ok, glad you found it.

I also created a shared folder on my OneDrive for us to use. I've sent the link via email.

We released a new version which should address the issue with your application.

The fix works. Thanks for the quick turn-around.