You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have had quite the discussion here EF Getting Started Discussion trying to figure out why the EF Core Power Tools works on some projects but not others.
Turns out, when the DbContext is in a satellite assembly instead of the start-up project when the project is built, the EF Core NuGet package DLL's are not being copied to the output directory and users are getting the below error in the output window when using your cool extension.
> Build started at 6:12 PM and took 0.680 seconds
System.Exception: Unable to find Microsoft.EntityFrameworkCore.dll in folder C:\Users\saved\Downloads\SamuraiApp-master\SamuraiApp-master\SamuraiApp.Data\bin\Debug\netcoreapp3.1.
You "could" change your code to find the start-up project to locate the EF Core DLLs' to prevent this error.
I came up with this to unblock all the developers who have their DbContext in a satellite assembly.
Essentially, the developer adds an internal class that derives from the DbContent in the other assembly. See below Db class.
They then run the EF Core Power Tools against the start-up assembly, and it works perfectly.
Best regards,
Karl
namespace MainApp {
class Program {
static void Main(string[] args) {
Console.WriteLine("Hello World!");
}
}
class Db : SamuraiDbContext {
}
}
The text was updated successfully, but these errors were encountered:
Note for you Karl: the reason this particular problem was occurring was because of a bug that was accidentally introduced in early August. It's been fixed with the Sept 18 update of the extension.
Hi @ErikEJ
We have had quite the discussion here
EF Getting Started Discussion trying to figure out why the EF Core Power Tools works on some projects but not others.
Turns out, when the DbContext is in a satellite assembly instead of the start-up project when the project is built, the EF Core NuGet package DLL's are not being copied to the output directory and users are getting the below error in the output window when using your cool extension.
You "could" change your code to find the start-up project to locate the EF Core DLLs' to prevent this error.
I came up with this to unblock all the developers who have their DbContext in a satellite assembly.
Essentially, the developer adds an internal class that derives from the DbContent in the other assembly. See below Db class.
They then run the EF Core Power Tools against the start-up assembly, and it works perfectly.
Best regards,
Karl
The text was updated successfully, but these errors were encountered: