Name cannot begin with the '$' character, hexadecimal value 0x24

Viewed 2696

I have this warning that never goes away and I don't know how to get it fixed:

Warning Name cannot begin with the '$' character, hexadecimal value 0x24.

.Android C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1668 Build

After enabling detailed verbosity, it points to this section of the Xamarin.Android.Common.targets file:

<Target Name="_GenerateJavaStubs" DependsOnTargets="_SetLatestTargetFrameworkVersion;_PrepareAssemblies;$(_AfterPrepareAssemblies)" Inputs="$(MSBuildAllProjects);@(_ResolvedAssemblies);$(_AndroidManifestAbs);$(_AndroidBuildPropertiesCache)" Outputs="$(IntermediateOutputPath)android\AndroidManifest.xml;$(_AcwMapFile);$(_AndroidTypeMappingJavaToManaged);$(_AndroidTypeMappingManagedToJava)">
  <GenerateJavaStubs ResolvedAssemblies="@(_ResolvedAssemblies)" ResolvedUserAssemblies="@(_ResolvedUserAssemblies)" ManifestTemplate="$(_AndroidManifestAbs)" MergedManifestDocuments="@(ExtractedManifestDocuments)" Debug="$(AndroidIncludeDebugSymbols)"
    NeedsInternet="$(AndroidNeedsInternetPermission)" AndroidSdkPlatform="$(_AndroidApiLevel)" AndroidSdkDir="$(_AndroidSdkDirectory)" PackageName="$(_AndroidPackage)" ManifestPlaceholders="$(AndroidManifestPlaceholders)" OutputDirectory="$(IntermediateOutputPath)android"
    MergedAndroidManifestOutput="$(IntermediateOutputPath)android\AndroidManifest.xml" UseSharedRuntime="$(AndroidUseSharedRuntime)" EmbedAssemblies="$(EmbedAssembliesIntoApk)" ResourceDirectory="$(MonoAndroidResDirIntermediate)" BundledWearApplicationName="$(BundledWearApplicationPackageName)"
    PackageNamingPolicy="$(AndroidPackageNamingPolicy)" ApplicationJavaClass="$(AndroidApplicationJavaClass)" AcwMapFile="$(_AcwMapFile)">
  </GenerateJavaStubs>
  <ConvertResourcesCases ResourceDirectories="$(MonoAndroidResDirIntermediate)" AcwMapFile="$(_AcwMapFile)" />
</Target>

I have no idea if I need to modify this or if one of my files is causing the issue. I double checked, none of my files actually start with a $.

Any ideas?

Thank you.

5 Answers

Seems to be a Xamarin bug, at least in some circumstances. Logged Github issues here and here with repro steps and a sample project.

For me, a Visual Studio 2017 update did the trick. Now it is only a warning anymore.

Name cannot begin with the '$' character, hexadecimal value 0x24.

VS 17 update from 15.4.4 to 15.7.4 was done.

I have experienced this error on Android, and what I have done to make it works is: "Version Number" should be a number and it should not contain the dot.

Related