在以下XAML代碼中,我收到警告,指出某些文件丟失。如何禁用不相關的xaml警告
<Application.Resources>
<!--Global View Model Locator-->
<viewModel:ViewModelLocator x:Key="Locator" d:IsDataSource="True" />
</Application.Resources>
該警告基於此代碼:
if (!File.Exists(filename))
{
throw new FileNotFoundException(string.Format("The specified file {0} is missing.", filename));
}
實際上這個文件丟失,但在運行時,它出現在正確的位置。 問題是我如何禁用此警告?爲什麼我在xaml中首先看到類似這樣的東西?
謝謝。