我有两个项目(Crestfine 和 CrestfineWebapp)已部署在 Azure Web 应用服务上。但是,Web 应用程序因错误而无法运行
Could not load file or assembly 'crestfine' or one of its dependencies. The system cannot find the file specified.
这里的 Crestfine 是运行良好的 Web API。 CrestfineWebapp 抛出此错误
装配加载跟踪:
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]
堆栈跟踪:
[FileNotFoundException: Could not load file or assembly 'crestfine' or one of its dependencies. The system cannot find the file specified.]
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +95
System.Type.GetType(String typeName, Boolean throwOnError) +63
System.Data.Entity.Internal.InitializerConfig.TryGetInitializer(Type requiredContextType, String contextTypeName, String initializerTypeName, Boolean isDisabled, Func`1 initializerArgs, Func`3 exceptionMessage) +46
[InvalidOperationException: Failed to set database initializer of type 'System.Data.Entity.MigrateDatabaseToLatestVersion`2[[crestfine.DAL.CrestfineContext, crestfine], [crestfine.Migrations.Configuration, crestfine]], EntityFramework, PublicKeyToken=b77a5c561934e089' for DbContext type 'crestfine.DAL.CrestfineContext, crestfine' specified in the application configuration. See inner exception for details.]
System.Data.Entity.Internal.InitializerConfig.TryGetInitializer(Type requiredContextType, String contextTypeName, String initializerTypeName, Boolean isDisabled, Func`1 initializerArgs, Func`3 exceptionMessage) +326
System.Data.Entity.Internal.<>c__DisplayClass6.<TryGetInitializerFromEntityFrameworkSection>b__1(ContextElement e) +276
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +223
System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +115
System.Data.Entity.Internal.InitializerConfig.TryGetInitializer(Type contextType) +23
System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.GetServiceFactory(Type type, String name) +534
System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +84
System.Data.Entity.Infrastructure.DependencyResolution.AppConfigDependencyResolver.GetService(Type type, Object key) +187
System.Linq.WhereSelectArrayIterator`2.MoveNext() +75
System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +115
System.Data.Entity.Infrastructure.DependencyResolution.CompositeResolver`2.GetService(Type type, Object key) +41
System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +159
System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +174
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +269
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +38
System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +77
System.Data.Entity.Internal.Linq.InternalSet`1.GetAsyncEnumerator() +21
System.Data.Entity.Infrastructure.IDbAsyncEnumerableExtensions.ForEachAsync(IDbAsyncEnumerable`1 source, Action`1 action, CancellationToken cancellationToken) +69
System.Data.Entity.Infrastructure.IDbAsyncEnumerableExtensions.ToListAsync(IDbAsyncEnumerable`1 source, CancellationToken cancellationToken) +315
最佳答案
关于c# - 无法加载文件或程序集 'XXX' 或其依赖项之一。该系统找不到指定的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49319995/