的實例,我花了10多天的尋找,我嘗試所有的解決方案。空項目錯誤 - 的XAML內部錯誤錯誤WMC9999:對象引用未設置到對象
我有這樣的錯誤消息時我添加這些庫我的項目 庫: - PresentationCore.dll中 - PresentationFramework.dll - System.xaml.dll - WindowsBase.dll中
錯誤消息: 在錯誤列表:
Object reference not set to an instance of an object. App1 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\WindowsXaml\v15.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets 266
輸出:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\WindowsXaml\v15.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets(266,5): Xaml Internal Error error WMC9999: Object reference not set to an instance of an object.
在此行中的出錯(從文件名Microsoft.Windows.UI.Xaml.Common.targets)
<CompileXaml
LanguageSourceExtension="$(DefaultLanguageSourceExtension)"
Language="$(Language)"
RootNamespace="$(RootNamespace)"
XamlPages="@(Page)"
XamlApplications="@(ApplicationDefinition)"
PriIndexName="$(PriIndexName)"
ProjectName="$(MsBuildProjectName)"
IsPass1="True"
CodeGenerationControlFlags="$(XamlCodeGenerationControlFlags)"
ProjectPath="$(MSBuildProjectFullPath)"
CIncludeDirectories="$(XamlCppIncludeDirectories)"
OutputPath="$(XamlGeneratedOutputPath)"
OutputType="$(OutputType)"
ReferenceAssemblyPaths="@(ReferenceAssemblyPaths)"
ReferenceAssemblies="@(ReferencePath)"
ForceSharedStateShutdown="False"
CompileMode="RealBuildPass1"
XAMLFingerprint="$(XAMLFingerprint)"
FingerprintIgnorePaths="$(XAMLFingerprintIgnorePaths)"
VCInstallDir="$(VCInstallDir)"
SavedStateFile="$(XamlSavedStateFilePath)"
SuppressWarnings="$(SuppressXamlWarnings)"
TargetPlatformMinVersion="$(TargetPlatformMinVersion)"
WindowsSdkPath="$(WindowsSdkPath)"
>
我覺得從庫中的錯誤,所以我厭倦了舊版本的框架庫,但同樣的錯誤出現。
我以爲我在我的代碼中有錯誤。所以,我創建了一個空的項目。添加庫。構建,並再次相同的錯誤,所以這個問題不是從我的代碼,因爲我沒有代碼在空項目。
我在互聯網上搜索建議將updat都Visual Studio和Windows的最新版本。 (我做了)
錯誤在我的代碼。 (它是空的新項目)
所以我最終兩手空空地與最惱人的錯誤,並且沒有解決方案制定了我最後的10天。
的Visual Studio社區從框架V.4.6.2 2017年 庫
請幫助
THANK YOU
哇,10天?顯然你不擅長搜索。所提出的問題沒有多大意義。 「未將對象引用設置爲對象的實例」是一個標準錯誤消息,很容易導致Googleable出現大量點擊。問題是,你沒有向我們展示任何*有*對象引用的代碼,所以我們不可能確定是什麼導致錯誤超出[該消息已經告訴你什麼](http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-how-do-i-fix-it) –
這意味着什麼?「我厭倦了舊圖書館」?你刪除了它們嗎?你是否嘗試升級/降級它們? 請閱讀[如何創建最小,完整且可驗證的示例](https://stackoverflow.com/help/mcve)。 發佈更多代碼,可能是Exception的截圖,每一個有用的信息都可以幫助其他SO用戶提供幫助。 此外,請避免大寫句子和重複調用的幫助。每個在這裏發佈問題的人都在尋求幫助,你的問題並不比其他人重要,並且不會因爲你寫這個方法而受到更多的關注。 –
謝謝你的回答和評論。正如我前面提到的,我創建了一個新項目,添加了庫並構建它,同樣的錯誤。我根本沒有代碼。那就是問題所在。我將編輯該問題以顯示VS.net文件中的錯誤。 – Ammar