Fix DefaultAndroidManifest embedded-resource name with explicit LogicalName Summary: ManifestMod.CreateDefaultAndroidManifest loads the bundled default Android manifest as an embedded resource via GetManifestResourceStream("Facebook.Unity.Editor.android.DefaultAndroidManifest.xml"). The .csproj declared <EmbeddedResource Include="android\DefaultAndroidManifest.xml" /> with no explicit LogicalName, leaving the resource’s manifest name up to the build toolchain. Under mono’s msbuild (used for both local mac builds and the Skycastle CI), the android folder segment is dropped, so the resource is embedded as Facebook.Unity.Editor.DefaultAndroidManifest.xml. That name mismatch makes GetManifestResourceStream return null, and the subsequent XmlDocument.Load(null) throws a NullReferenceException inside FacebookBuild.ExportPackage‘s manifest-generation step, failing the .unitypackage export. Add an explicit <LogicalName> so the resource is always named exactly what the code requests, independent of the toolchain’s resource-naming convention. Differential Revision: D109900918 fbshipit-source-id: 8118aaca486f517818867f979a8d6f07ed3a6f7b
Fix DefaultAndroidManifest embedded-resource name with explicit LogicalName
Summary: ManifestMod.CreateDefaultAndroidManifest loads the bundled default Android manifest as an embedded resource via GetManifestResourceStream("Facebook.Unity.Editor.android.DefaultAndroidManifest.xml"). The .csproj declared <EmbeddedResource Include="android\DefaultAndroidManifest.xml" /> with no explicit LogicalName, leaving the resource’s manifest name up to the build toolchain. Under mono’s msbuild (used for both local mac builds and the Skycastle CI), the android folder segment is dropped, so the resource is embedded as Facebook.Unity.Editor.DefaultAndroidManifest.xml. That name mismatch makes GetManifestResourceStream return null, and the subsequent XmlDocument.Load(null) throws a NullReferenceException inside FacebookBuild.ExportPackage‘s manifest-generation step, failing the .unitypackage export.
ManifestMod.CreateDefaultAndroidManifest
GetManifestResourceStream("Facebook.Unity.Editor.android.DefaultAndroidManifest.xml")
.csproj
<EmbeddedResource Include="android\DefaultAndroidManifest.xml" />
LogicalName
android
Facebook.Unity.Editor.DefaultAndroidManifest.xml
GetManifestResourceStream
XmlDocument.Load(null)
NullReferenceException
FacebookBuild.ExportPackage
.unitypackage
Add an explicit <LogicalName> so the resource is always named exactly what the code requests, independent of the toolchain’s resource-naming convention.
<LogicalName>
Differential Revision: D109900918
fbshipit-source-id: 8118aaca486f517818867f979a8d6f07ed3a6f7b
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号