Could not load file or assembly "System.Interactive.Async"
See original GitHub issueI’m trying to use scaffolding with aspnet-codegenerator but it fails with the following error message: Could not load file or assembly “System.Interactive.Async”
In my console window i write this command:
D:\855 ASP.NET\CMC\src\CMC>dotnet aspnet-codegenerator -p "D:\855 ASP.NET\CMC\src\CMC" controller -name ProjectController -m Project -dc CMC.Models.CMCContext
Building project ...
Finding the generator 'controller'...
Running the generator 'controller'...
Attempting to compile the application in memory
Attempting to figure out the EntityFramework metadata for the model and DbContext: Project
Could not load file or assembly 'System.Interactive.Async, Version=3.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263'. Das System kann die angegebene Datei nicht finden. StackTrace:
at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServiceCollectionExtensions.AddQuery(IServiceCollection serviceCollection)
at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServiceCollectionExtensions.AddEntityFramework(IServiceCollection serviceCollection)
at Microsoft.EntityFrameworkCore.Infrastructure.RelationalServiceCollectionExtensions.AddRelational(IServiceCollection services)
at Microsoft.Extensions.DependencyInjection.SqlServerServiceCollectionExtensions.AddEntityFrameworkSqlServer(IServiceCollection services)
at CMC.Startup.ConfigureServices(IServiceCollection services)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.EntityFrameworkServices.TryCreateContextUsingAppCode(Type dbContextType, ModelType startupType)
Could not load file or assembly 'System.Interactive.Async, Version=3.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263'. Das System kann die angegebene Datei nicht finden.
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.<BuildCommandLine>b__6_0()
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)
RunTime 00:00:38.43
If the assembly added with nuget then i also get this error.
My project.json looks like this:
{
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0-*"
},
"Microsoft.AspNetCore.Authentication": "1.0.0",
"Microsoft.AspNetCore.Authorization": "1.1.0-*",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.1.0-*",
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.1.0-*",
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-*",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0-preview1-final",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.EntityFrameworkCore": "1.1.0-preview1-final",
"Microsoft.EntityFrameworkCore.Design": "1.0.1",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0-preview1-final",
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-*",
"Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": "1.0.0-*",
"Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "1.0.0-preview3-final",
"System.Interactive.Async": "3.0.0"
},
"frameworks": {
"netcoreapp1.1": {
"imports": [
"dotnet5.6",
"dnxcore50",
"portable-net45+win8",
"portable-net45+win8+wp8+wpa81"
]
}
},
"publishOptions": {
"include": [
"wwwroot",
"**/*.cshtml",
"web.config"
]
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ],
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
},
"tools": {
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview3-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview3-final",
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.0.0-preview3-final",
"imports": [ "portable-net45+win8+wp8+wpa81" ]
}
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
EF Core 3.0 - Could not load file System.Interactive.Async · ...
I get this error after upgrade .NET Core 2.2 to .NET Core 3.0 and upgrade all package System.IO.FileNotFoundException: Could not load file ......
Read more >Visual Studio could not load System.Interactive.Async
1 Answer. I eventually solved the issue. The dll file was corrupted, so I just asked a friend to send me a copy...
Read more >Could not load file or assembly 'System.Interactive.Async ...
I'm having an issue with client-side streaming in C#. When my client code in a VSIX package tries to call a service that...
Read more >System.Interactive.Async 6.0.1
Interactive Extensions Async Library used to express queries over asynchronous enumerable sequences.
Read more >[grpc-io] Could not load file or assembly 'System.Interactive ...
Hi, I'm having an issue with client-side streaming in C#. When my client code in a VSIX package tries to call a service...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m having this same issue:
It makes sense in my case, since something caused the System.Interactive.Async package to be bumped up to v3.1.1.0, while EF Core clearly is looking for 3.0.0.0.
So for me, this fix is to add an assembly binding in app.config like so:
Closing because there doesn’t seem to be any further action required on this issue.