You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
使用Util.Core做了一个hello world,在windows环境下运行正常,但是发布到linux(centos7 mini)环境下运行时报错,估计是反射相关方法引起的,错误提示如下:
[root@localhost utiltest]# dotnet utiltest.dll
Application startup exception: System.IO.FileNotFoundException: Could not load file or assembly 'utiltest.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'utiltest.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks, IntPtr ptrLoadContextBinder)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, IntPtr ptrLoadContextBinder)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.AppDomain.Load(AssemblyName assemblyRef)
at Util.Reflections.Finder.LoadAssemblies(String path)
at Util.Reflections.WebFinder.GetAssemblies()
at Util.Dependency.DependencyConfiguration.RegistServices(ContainerBuilder builder)
at Util.Dependency.Container.CreateBuilder(IServiceCollection services, Action1 actionBefore, IConfig[] configs) at Util.Dependency.Container.Register(IServiceCollection services, Action1 actionBefore, IConfig[] configs)
--- 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()
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'utiltest.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks, IntPtr ptrLoadContextBinder)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, IntPtr ptrLoadContextBinder)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.AppDomain.Load(AssemblyName assemblyRef)
at Util.Reflections.Finder.LoadAssemblies(String path)
at Util.Reflections.WebFinder.GetAssemblies()
at Util.Dependency.DependencyConfiguration.RegistServices(ContainerBuilder builder)
at Util.Dependency.Container.CreateBuilder(IServiceCollection services, Action1 actionBefore, IConfig[] configs) at Util.Dependency.Container.Register(IServiceCollection services, Action1 actionBefore, IConfig[] configs)
--- 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 utiltest.Program.Main(String[] args) in C:\Users\nonep\source\repos\utiltest\utiltest\Program.cs:line 17
crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
Application startup exception
System.IO.FileNotFoundException: Could not load file or assembly 'utiltest.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'utiltest.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks, IntPtr ptrLoadContextBinder)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, IntPtr ptrLoadContextBinder)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.AppDomain.Load(AssemblyName assemblyRef)
at Util.Reflections.Finder.LoadAssemblies(String path)
at Util.Reflections.WebFinder.GetAssemblies()
at Util.Dependency.DependencyConfiguration.RegistServices(ContainerBuilder builder)
at Util.Dependency.Container.CreateBuilder(IServiceCollection services, Action1 actionBefore, IConfig[] configs) at Util.Dependency.Container.Register(IServiceCollection services, Action1 actionBefore, IConfig[] configs)
--- 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()
Aborted
The text was updated successfully, but these errors were encountered:
使用Util.Core做了一个hello world,在windows环境下运行正常,但是发布到linux(centos7 mini)环境下运行时报错,估计是反射相关方法引起的,错误提示如下:
[root@localhost utiltest]# dotnet utiltest.dll
Application startup exception: System.IO.FileNotFoundException: Could not load file or assembly 'utiltest.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'utiltest.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks, IntPtr ptrLoadContextBinder)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, IntPtr ptrLoadContextBinder)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.AppDomain.Load(AssemblyName assemblyRef)
at Util.Reflections.Finder.LoadAssemblies(String path)
at Util.Reflections.WebFinder.GetAssemblies()
at Util.Dependency.DependencyConfiguration.RegistServices(ContainerBuilder builder)
at Util.Dependency.Container.CreateBuilder(IServiceCollection services, Action
1 actionBefore, IConfig[] configs) at Util.Dependency.Container.Register(IServiceCollection services, Action
1 actionBefore, IConfig[] configs)--- 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()
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'utiltest.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks, IntPtr ptrLoadContextBinder)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, IntPtr ptrLoadContextBinder)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.AppDomain.Load(AssemblyName assemblyRef)
at Util.Reflections.Finder.LoadAssemblies(String path)
at Util.Reflections.WebFinder.GetAssemblies()
at Util.Dependency.DependencyConfiguration.RegistServices(ContainerBuilder builder)
at Util.Dependency.Container.CreateBuilder(IServiceCollection services, Action
1 actionBefore, IConfig[] configs) at Util.Dependency.Container.Register(IServiceCollection services, Action
1 actionBefore, IConfig[] configs)--- 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 utiltest.Program.Main(String[] args) in C:\Users\nonep\source\repos\utiltest\utiltest\Program.cs:line 17
crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
Application startup exception
System.IO.FileNotFoundException: Could not load file or assembly 'utiltest.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'utiltest.PrecompiledViews, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks, IntPtr ptrLoadContextBinder)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, IntPtr ptrLoadContextBinder)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at System.AppDomain.Load(AssemblyName assemblyRef)
at Util.Reflections.Finder.LoadAssemblies(String path)
at Util.Reflections.WebFinder.GetAssemblies()
at Util.Dependency.DependencyConfiguration.RegistServices(ContainerBuilder builder)
at Util.Dependency.Container.CreateBuilder(IServiceCollection services, Action
1 actionBefore, IConfig[] configs) at Util.Dependency.Container.Register(IServiceCollection services, Action
1 actionBefore, IConfig[] configs)--- 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()
Aborted
The text was updated successfully, but these errors were encountered: