Could not load file or assembly 'Castle.Core.AsyncInterceptor, Version=2.0.2

今天用vs 2019 web 发布到IIS的时候,报错:

 

System.IO.FileNotFoundException: Could not load file or assembly 'Castle.Core.AsyncInterceptor, Version=2.0.21.0, Culture=neutral, PublicKeyToken=e33b67d3bb5581e4'. 系统找不到指定的文件。
File name: 'Castle.Core.AsyncInterceptor, Version=2.0.21.0, Culture=neutral, PublicKeyToken=e33b67d3bb5581e4'
   at Abp.Runtime.Validation.Interception.ValidationInterceptorRegistrar.Kernel_ComponentRegistered(String key, IHandler handler)
   at Castle.MicroKernel.DefaultKernel.RaiseComponentRegistered(String key, IHandler handler)
   at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.RaiseEventsOnHandlerCreated(IHandler handler)
   at Castle.MicroKernel.DefaultKernel.AddCustomComponent(ComponentModel model)
   at Castle.MicroKernel.Registration.ComponentRegistration`1.Castle.MicroKernel.Registration.IRegistration.Register(IKernelInternal kernel)
   at Castle.MicroKernel.DefaultKernel.Register(IRegistration[] registrations)
   at Castle.Windsor.WindsorContainer.Register(IRegistration[] registrations)
   at Castle.Windsor.MsDependencyInjection.WindsorRegistrationHelper.AddBaseServices(IWindsorContainer container)
   at Castle.Windsor.MsDependencyInjection.WindsorRegistrationHelper.AddServices(IWindsorContainer container, IServiceCollection services)
   at Castle.Windsor.MsDependencyInjection.WindsorRegistrationHelper.CreateServiceProvider(IWindsorContainer container, IServiceCollection services)
   at Abp.AspNetCore.AbpServiceCollectionExtensions.AddAbp[TStartupModule](IServiceCollection services, Action`1 optionsAction)
   at DRMS.Web.Host.Startup.Startup.ConfigureServices(IServiceCollection services) in F:\DRMS\DRMS_Server\src\DRMS.Web.Host\Startup\Startup.cs:line 107
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.g__Startup|0(IServiceCollection serviceCollection)
   at Microsoft.AspNetCore.Hosting.StartupLoader.ConfigureServicesDelegateBuilder`1.<>c__DisplayClass15_0.g__RunPipeline|0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.b__0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.StartupLoader.ConfigureServicesDelegateBuilder`1.<>c__DisplayClass14_0.g__ConfigureServicesWithContainerConfiguration|0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.WebHost.EnsureApplicationServices()
   at Microsoft.AspNetCore.Hosting.WebHost.Initialize()
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
   at DRMS.Web.Host.Startup.Program.BuildWebHost(String[] args) in F:\DRMS\DRMS_Server\src\DRMS.Web.Host\Startup\Program.cs:line 15
   at DRMS.Web.Host.Startup.Program.Main(String[] args) in F:\DRMS\DRMS_Server\src\DRMS.Web.Host\Startup\Program.cs:line 10

发布的时候配置修改成any cpu

Could not load file or assembly 'Castle.Core.AsyncInterceptor, Version=2.0.2_第1张图片

你可能感兴趣的:(.Net,C#,错误解决)