Base solution for your next web application
Open Closed

System.BadImageFormatException: Bad IL format. #6539


User avatar
0
velu created

Hi,

This error occured while starting the application

System.BadImageFormatException: Bad IL format. at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly) at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath) at System.Reflection.Assembly.LoadFile(String path) at System.Linq.Enumerable.WhereSelectEnumerableIterator2.ToList() at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at Abp.PlugIns.FolderPlugInSource.GetModules() in D:\Github\aspnetboilerplate\src\Abp\PlugIns\FolderPlugInSource.cs:line 36 at Abp.PlugIns.PlugInSourceExtensions.GetModulesWithAllDependencies(IPlugInSource plugInSource) in D:\Github\aspnetboilerplate\src\Abp\PlugIns\PlugInSourceExtensions.cs:line 12 at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext() at System.Linq.Set1.UnionWith(IEnumerable1 other) at System.Linq.Enumerable.DistinctIterator1.FillSet() at System.Linq.Enumerable.DistinctIterator1.ToList() at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Abp.Modules.AbpModuleManager.FindAllModuleTypes(List1& plugInModuleTypes) in D:\Github\aspnetboilerplate\src\Abp\Modules\AbpModuleManager.cs:line 86 at Abp.Modules.AbpModuleManager.LoadAllModules() in D:\Github\aspnetboilerplate\src\Abp\Modules\AbpModuleManager.cs:line 67 at Abp.AbpBootstrapper.Initialize() in D:\Github\aspnetboilerplate\src\Abp\AbpBootstrapper.cs:line 155

Please help us to solve this issue.

Thanks


5 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    What did you change?

  • User Avatar
    0
    velu created

    HI,

    Added dynamsoft package in angular,

    No any change in Application Layer.

    It was workig properly but suddenly it gives this error.

    System.BadImageFormatException HResult=0x8007000B Message=Bad IL format. Source=System.Private.CoreLib StackTrace: at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly) at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath) at System.Reflection.Assembly.LoadFile(String path) at System.Linq.Enumerable.WhereSelectEnumerableIterator2.ToList() at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at Abp.PlugIns.FolderPlugInSource.GetModules() at Abp.PlugIns.PlugInSourceExtensions.GetModulesWithAllDependencies(IPlugInSource plugInSource) at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext() at System.Linq.Set1.UnionWith(IEnumerable1 other) at System.Linq.Enumerable.DistinctIterator1.FillSet() at System.Linq.Enumerable.DistinctIterator1.ToList() at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Abp.Modules.AbpModuleManager.FindAllModuleTypes(List1& plugInModuleTypes) at Abp.Modules.AbpModuleManager.LoadAllModules() at Abp.AbpBootstrapper.Initialize() at Abp.AspNetCore.AbpApplicationBuilderExtensions.InitializeAbp(IApplicationBuilder app) at Abp.AspNetCore.AbpApplicationBuilderExtensions.UseAbp(IApplicationBuilder app, Action1 optionsAction) at DpSecure.Web.Startup.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in D:\02 Working\DpSecureCORE\DpSecure\src\DpSecure.Web.Host\Startup\Startup.cs:line 179 `

    Thanks

  • User Avatar
    0
    aaron created
    Support Team

    Can you reproduce with a fresh download?

  • User Avatar
    0
    velu created

    HI,

    We are getting this error in Output window.

    'System.BadImageFormatException' in Abp.dll

    not able to generate with fresh download.

    We dont have any case to reproduce the issue.

  • User Avatar
    0
    aaron created
    Support Team

    Revert your change to find what went wrong.