.NET for Android 警告 XA1035

示例消息

warning XA1035: The 'BundleAssemblies' property is deprecated and no longer affects the build. Remove it. For supported .NET 10-and-earlier Mono projects, use 'AndroidUseAssemblyStore' with 'AndroidEnableAssemblyCompression' for the former behavior. .NET 11 CoreCLR controls packaged assembly-store behavior and needs no replacement setting.

问题

无论选择了哪种运行时,只要 $(BundleAssemblies) 为 true,就会发出此警告。 该属性不再影响生成过程。

解决方案

编辑项目文件并删除属性 $(BundleAssemblies) 。

对于受支持的使用 Mono 的 .NET 10 及更早版本项目,$(AndroidUseAssemblyStore)与$(AndroidEnableAssemblyCompression)配合使用可在需要时提供之前的行为。

对于 .NET 11 CoreCLR 项目,请勿添加替换属性。 CoreCLR 控制其打包程序集存储行为。