I'm getting the following when trying to localize a label control. I have embedded the exported XML files for the message store, but still looks like the key is being searched into the database. Before embedding, I've tried to deploy it via DDT, and the same was happening. a
LocalizationKeyNotFoundException The specified key [teste1] was not found within the localization database.KeyNotFoundException The message key [teste1] could not be found in the localization data.
Source : MicroFour StrataFrame Base
Stack Trace: at MicroFour.StrataFrame.UI.Localization.ThrowKeyNotFoundException(String Key) at MicroFour.StrataFrame.UI.Localization.GetKeyRowFromXml(String Key) at MicroFour.StrataFrame.UI.Localization.RetrieveTextValue(String TextValueKey) at MicroFour.StrataFrame.UI.Localization.SetLocalizationOnControl(ILocalizable ControlToSet) at MicroFour.StrataFrame.UI.Windows.Forms.Label.InitializeObject() at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects() at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks for any help.
Where these lines exist...do you have any other lines of code?
Second, have you right-clicked on your localization files and made sure that they are embedded?
This one I commented, as the help file states it's not necessary
This one is there, pointing to my project.
I went and right-clicked it, but didn't know what to check to see if it is embedded in the context-menu. But in the Properties sheet, the "Build Action" is set top "Embedded Resource"
MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Reflection.Assembly.GetExecutingAssembly(),"Internal Path to the XML files")
Did it ... got this:
ArgumentException The stream could not be evaluated because the resource could not be located.
Stack Trace: at MicroFour.StrataFrame.UI.Localization.CreateDataTableFromStream(Stream Input) at MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Assembly ContainingAssembly, String FullPath) at ProFilmeNET.AppMain.InitApplication(InitializingApplicationEventArgs e) in C:\ProFilme.NET\ClientDotNET\ProFilmeNETSolution\ProFilmeNET\AppMain.vb:line 181 at MicroFour.StrataFrame.Application.StrataFrameApplication.Raise_InitializingApplication(InitializingApplicationEventArgs e) at MicroFour.StrataFrame.Application.StrataFrameApplication.RunApplication() at ProFilmeNET.AppMain.Main() in C:\ProFilme.NET\ClientDotNET\ProFilmeNETSolution\ProFilmeNET\AppMain.vb:line 22 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Reflection.Assembly.GetExecutingAssembly(),