2
我正在使用XAML和C#開發Windows 8應用程序。 我創建了一個用於存儲本地化字符串的資源字典。Windows 8應用程序:未找到字符串
按原樣使用「< String>」標記時,編譯器會識別它,但表示它不受支持。
在我目前的配置:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="using:System">
<s:String x:Key="start">Start</s:String>
<s:String x:Key="pause">Pause</s:String>
<s:String x:Key="stop">Stop</s:String>
<s:String x:Key="deleteSelected">Delete Selected</s:String>
<s:String x:Key="timer">Timer</s:String>
<s:String x:Key="timers">Timers</s:String>
<s:String x:Key="stopper">Stopper</s:String>
<s:String x:Key="stoppers">Stoppers</s:String>
<s:String x:Key="alarmClock">Alarm Clock</s:String>
<s:String x:Key="alarmClocks">Alarm Clocks</s:String>
<s:String x:Key="recordLap">Record Lap</s:String>
</ResourceDictionary>
這是調試輸出:
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\Gilad Naaman\documents\visual studio 2012\Projects\TimeLord\TimeLord\bin\Debug\AppX\TimeLord.exe', Symbols loaded.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\system32\WinMetadata\Windows.UI.Xaml.winmd', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.InteropServices.WindowsRuntime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.InteropServices.WindowsRuntime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\system32\WinMetadata\Windows.ApplicationModel.winmd', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Collections\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Collections.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ObjectModel\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.ObjectModel.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\system32\WinMetadata\Windows.Foundation.winmd', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.WindowsRuntime.UI.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.WindowsRuntime.UI.Xaml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.WindowsRuntime\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.WindowsRuntime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
A first chance exception of type 'Windows.UI.Xaml.Markup.XamlParseException' occurred in TimeLord.exe
WinRT information: The type 'String' was not found. [Line: 13 Position: 44]
An exception of type 'Windows.UI.Xaml.Markup.XamlParseException' occurred in TimeLord.exe but was not handled in user code
WinRT information: The type 'String' was not found. [Line: 13 Position: 44]
Additional information: Unspecified error
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.DLL'
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
A first chance exception of type 'System.Exception' occurred in TimeLord.exe
'TimeLord.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Diagnostics.Debug\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Diagnostics.Debug.dll'
The program '[4992] TimeLord.exe: Program Trace' has exited with code 0 (0x0).
The program '[4992] TimeLord.exe: Managed (v4.0.30319)' has exited with code -1073741189 (0xc000027b).
Activation of the Windows Store app 'f109d0b0-d566-47cd-9551-2969e7b4abab_capbppsrwz44p!App' failed with error 'Windows was unable to communicate with the target application. This usually indicates that the target application's process aborted. More information may be available in the Debug pane of the Output window (Debug->Windows->Output)'.
也許你應該有一個看看建成的在翻譯系統中:http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh965329.aspx –