title: How to fix exception: " System.IO.FileNotFoundException" after run published WPF app?
body: <p>I published a <code>WPF</code> app. But when I setup and ran it  in different computer, there is  nothing display in the desktop. I tried to use <code>EventViewer</code> app and then explore some errors(I also tried in my computer, It worked OK with no exception and error): 
  <a href="https://i.stack.imgur.com/kC9gc.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <blockquote>
    <p>Source(.Net runtime) have 
    Error:</p>
  </blockquote>
  
  <pre><code> Exception Info: System.IO.FileNotFoundException
  
     at System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
     at System.Reflection.RuntimeAssembly.nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
     at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(System.Reflection.AssemblyName, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
     at System.Reflection.RuntimeAssembly.InternalLoad(System.String, System.Security.Policy.Evidence, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean)
     at System.Reflection.RuntimeAssembly.InternalLoad(System.String, System.Security.Policy.Evidence, System.Threading.StackCrawlMark ByRef, Boolean)
     at System.Reflection.Assembly.Load(System.String)
     at DevExpress.Utils.AssemblyHelper.GetAssembly(System.String)
     at DevExpress.Xpf.Core.Theme.GetAssembly()
     at DevExpress.Xpf.Core.Theme.get_Assembly()
     at DevExpress.Xpf.Core.ThemedElementsDictionary.GetThemeAssembly(System.String)
     at DevExpress.Xpf.Core.ThemedElementsDictionary.ForceThemeKeysLoading(System.String)
     at DevExpress.Xpf.Core.ThemeManager.ChangeTheme(System.Windows.DependencyObject, System.String, Boolean, Boolean, System.String)
     at DevExpress.Xpf.Core.ThemeManager.ThemeNamePropertyChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
     at System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
     at System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
     at System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
     at System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType)
     at System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty, System.Object, System.Windows.PropertyMetadata, Boolean, Boolean, System.Windows.OperationType, Boolean)
     at System.Windows.DependencyObject.SetCurrentValue(System.Windows.DependencyProperty, System.Object)
     at DevExpress.Xpf.Core.ThemeManager.DevExpress.Xpf.Utils.Themes.IThemeManager.SetThemeName(System.Windows.DependencyObject, System.String)
     at DevExpress.Xpf.Utils.Themes.GlobalThemeHelper.SetGlobalTheme(System.Windows.FrameworkElement)
     at DevExpress.Xpf.Utils.Themes.GlobalThemeHelper.AssignApplicationThemeName(System.Windows.FrameworkElement)
     at DevExpress.Xpf.Utils.Themes.GlobalThemeHelper.EnumerateSafe(System.Windows.WindowCollection, System.Action`1&lt;System.Windows.Window&gt;)
     at DevExpress.Xpf.Utils.Themes.GlobalThemeHelper.SetApplicationWindows()
     at DevExpress.Xpf.Utils.Themes.GlobalThemeHelper.SetWindowsApplicationThemeName()
     at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
     at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
     at System.Windows.Threading.DispatcherOperation.InvokeImpl()
     at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
     at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
     at System.Thr
  </code></pre>
  
  <blockquote>
    <p>Source Application have Error:</p>
  </blockquote>
  
  <pre><code> Faulting application name: WpfApplication5.exe, version: 1.0.0.0, time stamp: 0x5b491a6b
  Faulting module name: KERNELBASE.dll, version: 10.0.16299.309, time stamp: 0xd3aa915c
  Exception code: 0xe0434352
  Fault offset: 0x001008f2
  Faulting process id: 0x2ffc
  Faulting application start time: 0x01d41bc5ee509362
  Faulting application path: C:\Program Files (x86)\WPF5\WPF5\WpfApplication5.exe
  Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
  </code></pre>
  
  <p>I continued in one more computer. There was a dialog my app <code>"Has stopped working"</code> display, when clicked in detail button . It showed me exception occured with: <code>mscorlib.dll</code></p>
  
  <p>I wasted a week to search information to fix it. But I could not  solve it. Thank to Good bro to help me!</p>