我很难解决这个新问题。
它仅在编译时出现在解决方案的 xamarin.ios 项目上。
xamarin.android 项目编译正常。
我没有引用 system.memory 而是 netstandard 2.0 项目。
直到最近才编译得很好。
这是 xamarin.ios 工具中的已知问题吗?有什么解决方法吗?
我试过了:
我很干。
我在这里找到了解决方案!
在你的ios项目文件末尾添加:
<Target
Name="VS16_RemoveSystemMemory"
BeforeTargets="FindReferenceAssembliesForReferences"
Condition="'$(MSBuildVersion)' >= '16.0'">
<ItemGroup>
<_ReferencePathToRemove
Include="@(ReferencePath)"
Condition="'%(ReferencePath.NuGetPackageId)'=='System.Memory'" />
<ReferencePath Remove="@(_ReferencePathToRemove)" />
</ItemGroup>
<Message Text="Removing System.Memory for VS 2019 compatibility" Importance="high"/>
</Target>
Run Code Online (Sandbox Code Playgroud)
它神奇地编译了!
我不知道这个 nuget 依赖项来自哪里,但它不是来自我的代码,它来自第三方 nuget,很可能来自 Google 的。
| 归档时间: |
|
| 查看次数: |
624 次 |
| 最近记录: |