Как понять основную причину system.io.filenotfoundexception?C#

Место общения программистов C#
Ответить
Anonymous
 Как понять основную причину system.io.filenotfoundexception?

Сообщение Anonymous »

Я работаю с довольно сложной средой:
Существует два основных исполнителя:
.exe и .desktop.exe , приложение сервера и клиентское приложение. Оба приложения не должны быть изменены. < /p>
На прошлой неделе я запустил клиентское приложение, и теперь это, кажется, больше не работает. Это было бы связано с отсутствием telerik.openaccess.35.extensions.dll , но это не имеет смысла: на прошлой неделе у меня также не было этого файла в моем каталоге времени выполнения, и все же все работало нормально. < /p>
Можете ли вы узнать, где я должен посмотреть, чтобы понять, почему мое приложение сейчас спрашивает этот файл Telerik < /code>? < /p>
Это мой NLOG -основанный выходной файл:

Код: Выделить всё

2022-06-13 09:13:22.0707 | Application_Client.Desktop.App | Uncaught exception in MainWindow. --- System.IO.FileNotFoundException: Could not load file or assembly 'Telerik.OpenAccess.35.Extensions, Version=2016.2.822.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The system cannot find the file specified.
File name: 'Telerik.OpenAccess.35.Extensions, Version=2016.2.822.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' ---> System.IO.FileNotFoundException: Could not load file or assembly 'Telerik.OpenAccess.35.Extensions, Version=2016.2.822.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The system cannot find the file specified.
File name: 'Telerik.OpenAccess.35.Extensions, Version=2016.2.822.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.ReflectionOnlyLoad(String assemblyString)
at Prism.Modularity.DirectoryModuleCatalog.InnerModuleInfoLoader.OnReflectionOnlyResolve(ResolveEventArgs args, DirectoryInfo directory)
at System.AppDomain.OnReflectionOnlyAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable  C:\\Application_Desktop.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: DisplayName = Telerik.OpenAccess.35.Extensions, Version=2016.2.822.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342
(Fully-specified)
LOG: Appbase = file:///C://
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This is an inspection only bind.
LOG: Using application configuration file: C:\\Application_Desktop.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Attempting download of new URL file:///C://Telerik.OpenAccess.35.Extensions.DLL.
LOG: Attempting download of new URL file:///C://Telerik.OpenAccess.35.Extensions/Telerik.OpenAccess.35.Extensions.DLL.
LOG: Attempting download of new URL file:///C://Modules/Telerik.OpenAccess.35.Extensions.DLL.
LOG: Attempting download of new URL file:///C://Modules/Telerik.OpenAccess.35.Extensions/Telerik.OpenAccess.35.Extensions.DLL.
LOG: Attempting download of new URL file:///C://Telerik.OpenAccess.35.Extensions.EXE.
LOG: Attempting download of new URL file:///C://Telerik.OpenAccess.35.Extensions/Telerik.OpenAccess.35.Extensions.EXE.
LOG: Attempting download of new URL file:///C://Modules/Telerik.OpenAccess.35.Extensions.EXE.
LOG: Attempting download of new URL file:///C://Modules/Telerik.OpenAccess.35.Extensions/Telerik.OpenAccess.35.Extensions.EXE.

at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at Prism.Modularity.DirectoryModuleCatalog.InnerModuleInfoLoader.c__DisplayClass1_0.b__2(FileInfo file)
at System.Linq.Enumerable.d__17`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Prism.Modularity.DirectoryModuleCatalog.InnerModuleInfoLoader.GetModuleInfos(String path)
at Prism.Modularity.DirectoryModuleCatalog.InnerModuleInfoLoader.GetModuleInfos(String path)
at Prism.Modularity.DirectoryModuleCatalog.InnerLoad()
at Prism.Modularity.ModuleCatalog.Initialize()
at Prism.Modularity.ModuleManager.Run()
at Application_Client.Desktop.Bootstrapper.InitializeModules() in D:\a\1\s\Application_Client.Desktop\Bootstrapper.cs:line 73
at Prism.Unity.UnityBootstrapper.Run(Boolean runWithDefaultConfiguration)
at Application_Client.Desktop.App.StartUp(Object sender, StartupEventArgs e) in D:\a\1\s\Application_Client.Desktop\App.xaml.cs:line 46
at System.Windows.Application.OnStartup(StartupEventArgs e)
at System.Windows.Application.b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&  handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at Application_Client.Desktop.App.Main()
< /code>
 edit: callstack < /strong>

На сегодняшний день моя проблема: < /p>
>   mscorlib.dll!System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity, System.Reflection.RuntimeAssembly reqAssembly, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool throwOnFileNotFound, bool forIntrospection, bool suppressSecurityChecks) Line 1859  C#
mscorlib.dll!System.Reflection.RuntimeAssembly.InternalLoad(string assemblyString, System.Security.Policy.Evidence assemblySecurity, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool forIntrospection) Line 1743 C#
mscorlib.dll!System.Reflection.RuntimeAssembly.InternalLoad(string assemblyString, System.Security.Policy.Evidence assemblySecurity, ref System.Threading.StackCrawlMark stackMark, bool forIntrospection) Line 1722    C#
mscorlib.dll!System.Reflection.Assembly.ReflectionOnlyLoad(string assemblyString) Line 328  C#
Prism.Wpf.dll!Prism.Modularity.DirectoryModuleCatalog.InnerModuleInfoLoader.OnReflectionOnlyResolve(System.ResolveEventArgs args, System.IO.DirectoryInfo directory)    Unknown
mscorlib.dll!System.AppDomain.OnReflectionOnlyAssemblyResolveEvent(System.Reflection.RuntimeAssembly assembly, string assemblyFullName) Line 3191   C#
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.Reflection.RuntimeAssembly.GetExportedTypes() Line 1517 C#
Prism.Wpf.dll!Prism.Modularity.DirectoryModuleCatalog.InnerModuleInfoLoader.GetNotAllreadyLoadedModuleInfos.AnonymousMethod__2(System.IO.FileInfo file) Unknown
System.Core.dll!System.Linq.Enumerable.SelectManyIterator(System.Collections.Generic.IEnumerable source, System.Func selector)    Unknown
System.Core.dll!System.Linq.Buffer.Buffer(System.Collections.Generic.IEnumerable source)  Unknown
System.Core.dll!System.Linq.Enumerable.ToArray(System.Collections.Generic.IEnumerable source) Unknown
Prism.Wpf.dll!Prism.Modularity.DirectoryModuleCatalog.InnerModuleInfoLoader.GetModuleInfos(string path) Unknown
[AppDomain (Application.Desktop.exe, #1) ->  AppDomain (DiscoveryRegion, #2)]
Prism.Wpf.dll!Prism.Modularity.DirectoryModuleCatalog.InnerLoad()   Unknown
Prism.Wpf.dll!Prism.Modularity.ModuleCatalog.Initialize()   Unknown
Prism.Wpf.dll!Prism.Modularity.ModuleManager.Run()  Unknown
Application.Desktop.exe!Application.Client.Desktop.Bootstrapper.InitializeModules() Line 73 C#
Prism.Unity.Wpf.dll!Prism.Unity.UnityBootstrapper.Run(bool runWithDefaultConfiguration) Unknown
Application.Desktop.exe!Application.Client.Desktop.App.StartUp(object sender, System.Windows.StartupEventArgs e) Line 46    C#
PresentationFramework.dll!System.Windows.Application.OnStartup(System.Windows.StartupEventArgs e)   Unknown
PresentationFramework.dll!System.Windows.Application..ctor.AnonymousMethod__1_0(object unused)  Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)  Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()   Unknown
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj)   Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980  C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928  C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 917    C#
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state)  Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()   Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()  Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)  Unknown
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)  Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)   Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)  Unknown
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame)   Unknown
PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore)   Unknown
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window)  Unknown
Application.Desktop.exe!Application.Client.Desktop.App.Main()   Unknown
заранее спасибо


Подробнее здесь: https://stackoverflow.com/questions/725 ... dexception
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C#»