1
我正在使用LocBaml本地化WPF應用程序。我已成功創建了附屬程序集並將它們放入適當的文件夾中。我從我的盒子裏運行應用程序,它效果很好!隨時更改語言等問題是,我不能在任何其他機器上運行它,但我的。我可以讓同事在他們的盒子上編譯應用程序,並且我可以成功地從映射到我的機器上運行應用程序,但他不能。這是完全令人困惑的。我敢肯定這件事很簡單,我忽略了它。使用LocBaml的WPF本地化:System.IO.IOException未處理
System.IO.IOException was unhandled
HResult=-2146232800
Message=Cannot locate resource 'maincontrol.baml'.
Source=PresentationFramework
StackTrace:
at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at DCG.Designer.Library.MainControl.InitializeComponent() in D:\TFS\CardWizard Software Main\Trunk\ClientInterfaces\DCG.Designer.Library\obj\Debug\MainControl.g.vb:line 628
at DCG.Designer.Library.MainControl..ctor() in D:\TFS\CardWizard Software Main\Trunk\ClientInterfaces\DCG.Designer.Library\MainControl.xaml.vb:line 42
at DCG.Designer.MainWindow.libWindow_LanguageChanged(Object sender, CultureInfo Language) in D:\TFS\CardWizard Software Main\Trunk\ClientInterfaces\DCG.Designer\MainWindow.xaml.vb:line 240
at DCG.Designer.Library.MainControl.Language_Click(Object sender, RoutedEventArgs e) in D:\TFS\CardWizard Software Main\Trunk\ClientInterfaces\DCG.Designer.Library\MainControl.xaml.vb:line 808
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
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 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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, 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.RunInternal(Window window)
at System.Windows.Application.Run()
at DCG.Designer.Application.Main() in D:\TFS\CardWizard Software Main\Trunk\ClientInterfaces\DCG.Designer\obj\Debug\Application.g.vb:line 65
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
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 System.Threading.ThreadHelper.ThreadStart()