我使用以下方式在WPF应用中工作:
在我调试应用程序时,我在调用MVVM Light或MahApps.Metro方法的行中出错。
对于MVVM Light,这里是代码:
public List<string> validation_errors
{
get
{
return _validation_errors;
}
set
{
_validation_errors = value;
RaisePropertyChanged("validation_errors");
}
}
这是错误消息:
无可用资源
当前位置没有可用的源代码。
调用堆栈位置:
GalaSoft.MvvmLight.dll!GalaSoft.MvvmLight.ObersvableObject.RaisePropertyChanged(strinh propertyName)第195行
源文件信息:
Locating source for 'D:\GalaSoft\mydotnet\MVVMLight\source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\ObservableObject.cs'. (No checksum.)
The file 'D:\GalaSoft\mydotnet\MVVMLight\source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\ObservableObject.cs' does not exist.
Looking in script documents for 'D:\GalaSoft\mydotnet\MVVMLight\source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\ObservableObject.cs'...
Looking in the projects for 'D:\GalaSoft\mydotnet\MVVMLight\source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\ObservableObject.cs'.
The file was not found in a project.
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: D:\GalaSoft\mydotnet\MVVMLight\source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\ObservableObject.cs.
The debugger could not locate the source file 'D:\GalaSoft\mydotnet\MVVMLight\source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\ObservableObject.cs'.
这是MahApps.Metro的代码:
_dialogCoordinator.ShowMessageAsync(this, Resources.lang.information_message, Resources.lang.data_saved, MessageDialogStyle.Affirmative);
这是MahApps.Metro的错误消息:
无可用资源
当前位置没有可用的源代码。
调用堆栈位置:
MahApps.Metro.dll!MahApps.Metro.Controls.Dialogs.DialogCoordinator.ShowMessageAsync(对象上下文,字符串标题,字符串消息,MahApps.Metro.Controls.Dialogs.MessageDialogStyle样式,MahApps.Metro.Controls.Dialogs.MetroDialogSettings设置)第40行
源文件信息:
Locating source for 'd:\projects\git\MahApps.Metro\MahApps.Metro\Controls\Dialogs\DialogCoordinator.cs'. (No checksum.)
The file 'd:\projects\git\MahApps.Metro\MahApps.Metro\Controls\Dialogs\DialogCoordinator.cs' does not exist.
Looking in script documents for 'd:\projects\git\MahApps.Metro\MahApps.Metro\Controls\Dialogs\DialogCoordinator.cs'...
Looking in the projects for 'd:\projects\git\MahApps.Metro\MahApps.Metro\Controls\Dialogs\DialogCoordinator.cs'.
The file was not found in a project.
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: d:\projects\git\MahApps.Metro\MahApps.Metro\Controls\Dialogs\DialogCoordinator.cs.
The debugger could not locate the source file 'd:\projects\git\MahApps.Metro\MahApps.Metro\Controls\Dialogs\DialogCoordinator.cs'.
我尝试过的事情:
我发现了一个类似的问题here。我已尝试启用该选项:
Tools > Options > Debugging > General > Just My Code
但我没有运气。
为了摆脱因缺少源代码而导致的中断,我还能尝试什么?感谢。