I’ve a project that uses Xaml and C#. When trying to build it, I get the error described in the title.
Here the full error:
Severity Code Description Project File Line Suppression State
Error (active) WMC9999 Name cannot begin with the ‘ ‘ character, hexadecimal value 0x20. Line 2, position 3. BetterApp C:Usersadmin.nugetpackagesmicrosoft.windowsappsdk1.5.240404000buildTransitiveMicrosoft.UI.Xaml.Markup.Compiler.interop.targets 505
And here a little snippet of where it says where the error is:
`<CompileXaml Condition="'$(UseXamlCompilerExecutable)' != 'true'"
LanguageSourceExtension="$(DefaultLanguageSourceExtension)"
Language="$(XamlLanguage)"
RootNamespace="$(RootNamespace)"
XamlPages="@(Page)"
XamlApplications="@(ApplicationDefinition)"
PriIndexName="$(PriIndexName)"
ProjectName="$(XamlProjectName)"
IsPass1="True"
CodeGenerationControlFlags="$(XamlCodeGenerationControlFlags)"
ProjectPath="$(MSBuildProjectFullPath)"
CIncludeDirectories="$(XamlCppIncludeDirectories)"
OutputPath="$(XamlGeneratedOutputPath)"
OutputType="$(OutputType)"
ReferenceAssemblyPaths="@(ReferenceAssemblyPaths)"
ReferenceAssemblies="@(ReferencePath)"
ForceSharedStateShutdown="False"
CompileMode="RealBuildPass1"
XAMLFingerprint="$(XAMLFingerprint)"
UseVCMetaManaged="$(UseVCMetaManaged)"
FingerprintIgnorePaths="$(XAMLFingerprintIgnorePaths)"
VCInstallDir="$(VCInstallDir)"
SavedStateFile="$(XamlSavedStateFilePath)"
SuppressWarnings="$(SuppressXamlWarnings)"
TargetPlatformMinVersion="$(TargetPlatformMinVersion)"
WindowsSdkPath="$(WindowsSdkPath)"
XamlResourceMapName="$(XamlResourceMapName)"
XamlComponentResourceLocation="$(XamlComponentResourceLocation)"
FeatureControlFlags="@(XamlFeatureControlFlags)"
VCInstallPath32="$(VCInstallPath32)"
VCInstallPath64="$(VCInstallPath64)"
GenXbfPath="$(GenXbfPath)"
PrecompiledHeaderFile="$(PrecompiledHeaderFile)" >
<Output Condition=" '$(ManagedAssembly)'!='false' " ItemName="Compile" TaskParameter="GeneratedCodeFiles" />
<!--
FileWrites is used in Microsoft.Common.Targets for "Clean" build
-->
<Output ItemName="FileWrites" TaskParameter="GeneratedCodeFiles" />
<Output ItemName="FileWrites" TaskParameter="GeneratedXamlFiles" />
<Output ItemName="FileWrites" TaskParameter="GeneratedXbfFiles" />
<Output ItemName="_GeneratedCodeFiles" TaskParameter="GeneratedCodeFiles" />
<Output ItemName="_GeneratedXamlFiles" TaskParameter="GeneratedXamlFiles" />
<Output ItemName="_GeneratedXbfFiles" TaskParameter="GeneratedXbfFiles" />
</CompileXaml>`
I’ve reinstalled the SDK multiple times now and also created a new project. Visual Studio is freshly updated but the issue still persists.
Mister Orange is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.