我有一个 Xamarin.Android 项目在尝试在发布配置中构建解决方案时挂起。我已将其缩小到链接器的问题 - 如果链接器关闭,一切正常。
我已经完成了更详细的构建,甚至msbuild
从命令行使用(这表明这不是 IDE 问题),结果是一样的。直到它挂起的构建输出显示:
Target _LinkAssembliesShrink:
Building target "_LinkAssembliesShrink" completely.
Input file "obj/Preview/linksrc/BondiToManly.Android.dll" is newer than output file "obj/Preview/link.flag".
Task "CreateProperty" skipped, due to false condition; ( '$(AndroidLinkTool)' != '' ) was evaluated as ( '' != '' ).
Task "MakeDir" skipped, due to false condition; ( '$(AndroidLinkTool)' != '' ) was evaluated as ( '' != '' ).
Using "LinkAssemblies" task from assembly "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Build.Tasks.dll".
Task "LinkAssemblies"
Processing resource linker descriptor: mscorlib.xml
Processing resource linker descriptor: Mono.Android.xml
Processing embedded resource linker descriptor: mscorlib.xml
Duplicate preserve in descriptor mscorlib.xml from Xamarin.Android.Build.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null of System.AppDomain (Nothing). Duplicate uses (Fields)
Duplicate preserve in descriptor mscorlib.xml from Xamarin.Android.Build.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null of System.AppDomainSetup (Fields). Duplicate uses (Fields)
Type Mono.ValueTuple has no fields to preserve
Type System.Reflection.Assembly has no fields to preserve
Type System.Reflection.Emit.ByRefType has no fields to preserve
Type System.Reflection.Emit.PointerType has no fields to preserve
它真的挂了,就像线程死锁什么的。没有办法取消构建,您只需要退出 IDE(同样,终端中的 ^C 也不执行任何操作)。
这似乎只会影响我拥有的这个 Xamarin 项目(许多其他具有类似配置的项目都可以正常构建)。在这个阶段,我真的只是希望找到一种方法来了解发生了什么问题。
任何提示将不胜感激。