I spent more than 10 days searching for a solution which I tried them all.
I have this error message when I add those libraries to my project Libraries: - PresentationCore.dll - PresentationFramework.dll - System.xaml.dll - WindowsBase.dll
Error Message: In Error List:
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
In output:
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.
The Error in this Line (from file name 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)"
>
I think the error from the libraries so I tired old versions from framework libraries but the same error appears.
I thought I have error in my code. So, I created an empty project. added library. Build, and same error again, So the problem is not from my code since I have no code in empty project.
My search on the internet suggests to updat both Visual studio and windows to the latest version. (I did that)
Error in my code. (it's empty new project)
So I end up with empty hands with most annoying error and no solution worked out for me for the last 10 days.
Visual Studio Community 2017 Libraries from framework V.4.6.2
PLEASE HELP
THANK YOU