Entity Framework Duplicate type name within an assembly (6.1.0)
- by CodeMilian
I am not sure what is going on but I keep getting the following exception when doing a query.
"Duplicate type name within an assembly."
I have not been able to find a solution on the web. I had resolved the issue by removing entity framework from all the projects in the solutions and re-installing using nugget. Then all of the sudden the exception is back. I have verified my table schema over and over and find nothing wrong with.
This is the query causing the exception.
var BaseQuery = from Users in db.Users
join UserInstalls in db.UserTenantInstalls on Users.ID equals UserInstalls.UserID
join Installs in db.TenantInstalls on UserInstalls.TenantInstallID equals Installs.ID
where
Users.Username == Username
&& Users.Password == Password
&& Installs.Name == Install
select Users;
var Query = BaseQuery.Include("UserTenantInstalls.TenantInstall");
return Query.FirstOrDefault();
As I mentioned previously the same query was working before. The data has not changed and the code has not changed.