c# - 如何在 Android 项目的 Visual Studio for Mac 中将 'EmbedAssembliesIntoApk' MSBuild 属性设置为 'true'?

标签 c# xamarin

我的 android 项目有问题,想将 EmbedAssembliesIntoApk 设置为 true 吗?

错误是:

error XA0130: Please disable fast deployment in the Visual Studio project property pages or edit the project file in a text editor and set the 'EmbedAssembliesIntoApk' MSBuild property to 'true'.

从哪里可以将 EmbedAssembliesIntoApk 设置为 true ?

最佳答案

从您的错误消息中,您可以查看有关 Fast Deployment 的信息, 快速部署通过进一步缩小 Android 应用程序包大小来工作。

要删除这个错误信息,有两种方法,一种是双击Android项目属性---选择Android选项---禁用< strong>使用快速开发(仅限 Debug模式)

快速部署在默认情况下是启用的,并且可以通过设置 $(EmbedAssembliesIntoApk) 在调试构建中禁用。属性为 True。

另一种方法是转到csproj 文件,尝试放置<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>在调试配置中 PropertyGroup

关于去csproj文件,可以看看:

How to find open Xamarin Android or iOS csproj file in Visual Studio Solution Explorer

关于c# - 如何在 Android 项目的 Visual Studio for Mac 中将 'EmbedAssembliesIntoApk' MSBuild 属性设置为 'true'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67603184/

相关文章:

c# - 是否可以在多个应用程序域中并行运行相同的应用程序?

c# - 自动化测试中的 DbContext.ChangeTracker 抛出 SQLException

c# - 我怎样才能将一个单选组分成 2 列和 5 行,包含 10 个单选按钮?

c# - 以编程方式在 TabbedPage 中的选项卡之间切换

c# - Entity Framework linq 查询,根据计数从收藏夹的表中获取前 N 个 postID

wpf - 意外删除了 Xaml 文件的隐藏代码。如何再次添加后面的代码?

c# - PropertyChanged 时 INotifyPropertyChanged

php - 移动应用程序 - 与外部服务器通信

xamarin - 如何在 Xamarin 主菜单中的项目之间绘制水平线?

c# - 为什么我的 Xamarin PCL 在为通用应用程序构建版本时抛出运行时异常?