Entity Framework Duplicate type name within an assembly (6.1.0)

c# entity-framework linq sql-server visual-studio-2013


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
                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.

4/21/2014 12:50:02 AM

Popular Answer

As a work around, this only happens if you are single-stepping using the debugger. If you place your break point a few lines further down inside your source, the error will not show up.

I haven't uninstalled, and this at least allows me to continue working.

5/7/2014 10:56:31 PM

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow