
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am using Revit 2019 and I have a plugin that is supposed to use EntityFramework to read/write to a database. I have a class called LifeSciencesContext that extends DbContext. As soon as the constructor for LifeSciencesContext (which calls the base constructor) gets hit, I get the exception below.
In my project I have a reference to System.Interactive.Async v3.2.0.0.
In app.config I have the line "<bindingRedirect oldVersion="0.0.0.0-3.2.0.0" newVersion="3.2.0.0" />"
I also believe that this is something that has to do with Revit as opposed to anything else because I created a standalone project that bypasses Revit entirely, and this exception does not occur in that situation.
Has anyone else come across anything like this and fixed it? I've tried all the things mentioned in any forum that is remotely similar to this, but none have worked. Any ideas?
Exception mentioned above:
"Could not load file or assembly 'System.Interactive.Async, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263' or one of its dependencies. The system cannot find the file specified."
Stack Trace:
at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder.TryAddCoreServices()
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.ApplyServices(IDbContextOptions options, ServiceCollection services)
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_0.<GetOrAdd>b__2(Int64 k)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.EntityFrameworkCore.DbContext.Constructor(DbContextOptions options)
at BT.Data.LifeSciencesContext.Constructor(String connectionString) in C:\\Views\\Plugins\\LifeSciences\\BT.Data\\LifeSciencesContext.cs:line 48
at BT.Data.Repo.FacilityRepo.Constructor(String connectionString) in C:\\Views\\Plugins\\LifeSciences\\BT.Data.Repo\\FacilityRepo.cs:line 32
Solved! Go to Solution.