-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facing 'multiple assemblies with equivalent identity' on .NET 4.5 with latest build #3407
Comments
I had the exact same problem that was solved by removing all EF nuget stuff and then just pulling in EntityFramework.MicrosoftSqlServer (they renamed the nuget from EntityFramework.SqlServer). Thanks to Maurycy for that tip about nuget rename. |
@htuomola are you able to reproduce this issue on a clean solution/project? |
The can also be caused by having a version of Microsoft.AspNet.Identity.EntityFramework and EntityFramework.(Microsoft)SqlServer that do not agree. If you are using EntityFramework.MicrosoftSqlServer (the most-current package name), make sure you are using Identity >= build 15850. (cref #3331) |
@rowanmiller which one, the assembly identity error or the entry point exception? I am able to repro the former by just creating a new empty .NET 4.5.2 console app and calling The exception on entry point looks like to have been caused by the solution still using and old version of EntityFramework.SqlServer package. Due to the rename Nuget wasn't able to suggest an update. Uninstalling that and installing EntityFramework.MicrosoftSqlServer fixed that part. Thanks to @venomed for the tip. |
Confirmed that this repros for me too, just |
I suspect it's caused by our upgrade of immutable collections. I'll dig into it on Monday |
For what it's worth, here's the nuget output for this (using EntityFramework.Relational is enough for repro):
Attempting to gather dependencies information for package 'Entityframework.Relational.7.0.0-rc1-15945' with respect to project 'EFTest.Issue3407_2', targeting '.NETFramework,Version=v4.5.2' If the package installation order can be used as a sign of dependencies, I think this is due to EntityFramework.Relational depending on System.Diagnostics.Tracing.Telemetry. That only defines .Net 5.0 dependencies, at least for the latest package. Just my 2 cents. :) |
This appears to be fixed now. Please re-open if you're still having problems. |
I have this error any one have idea about this what i do ? |
@mailtoshafaqat This issue tracked by this item is marked as fixed. If you feel there is still some issue here, then please file a new bug providing full details of the issue and how to reproduce it. |
Hi, I just updated (or tried to) the solution to 7.0.0-rc1-15945. Looks like the System.Diagnostics.Tracing.Telemetry declares dependencies just for .NET 5.0 and thus it pulled in System.Threading.Tasks v.4.0.0-beta-23019 and that one added System.Threading and System.Runtime.
As a result, I get build errors "Multiple assemblies with equivalent identity have been imported: '..\packages\System.Threading.4.0.10-beta-22605\lib\net45\System.Threading.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.2\Facades\System.Threading.dll'. Remove one of the duplicate references."
Interestingly, I was able to remove all three packages after they had been installed. Not sure if this is related or a consequence of me tinkering with the packages, but post-upgrade the app fails to start because of System.EntryPointNotFoundException: Entry point was not found. with stack trace:
at Microsoft.Data.Entity.Infrastructure.IAccessor
1.get_Service() at Microsoft.Framework.DependencyInjection.SqlServerEntityFrameworkServicesBuilderExtensions.AddSqlServer(EntityFrameworkServicesBuilder builder) at Microsoft.Data.Entity.Internal.ServiceProviderCache.GetOrAdd(IDbContextOptions options) at Microsoft.Data.Entity.DbContext.InitializeServices(IServiceProvider serviceProvider, DbContextOptions options) at Microsoft.Data.Entity.Internal.LazyRef
1.get_Value()at Microsoft.Data.Entity.DbContext.get_ServiceProvider()
at Microsoft.Data.Entity.DbContext.b__12_1()
at Microsoft.Data.Entity.Internal.LazyRef`1.get_Value()
at Microsoft.Data.Entity.DbContext.Set()
The text was updated successfully, but these errors were encountered: