【问题标题】:Xamarin Forms UWP - Error : ILT0042: Arrays of pointer types are not currently supportedXamarin Forms UWP - 错误:ILT0042:当前不支持指针类型数组
【发布时间】:2017-01-02 07:53:31
【问题描述】:

我收到了这个错误,并且.. 网络上没有任何内容!好像来自Newtonsoft.Json..

有我的PCL项目

output
1>  Newtonsoft.Json
1>  Imported XAML Roots from 2 files:
1>  C:\PROJECT_PATH\PROJECT.UWP\obj\ARM\Release\ilc\in\PROJECT.UWP.xr.xml
1>  C:\PROJECT_PATH\PROJECT.UWP\obj\ARM\Release\ilc\in\Xamarin.Forms.Platform.UAP\Xamarin.Forms.Platform.UAP.xr.xml
1>C:\PROJECT_PATH\PROJECT.UWP\Resources.System.Linq.Expressions.rd.xml(35): warning : ILTransform_0027: Method 'CreateLambda' within 'System.Linq.Expressions.Expression' could not be found.
1>C:\PROJECT.UWP\Resources.System.Linq.Expressions.rd.xml(91): warning : ILTransform_0027: Method 'ParameterIsAssignable' within 'System.Linq.Expressions.Expression' could not be found.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Generation.CompilerHelpers.MemberEquals(System.Reflection.MemberInfo, System.Reflection.MemberInfo)' at IL offset 0x3F.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Utils.ReflectionUtils.MatchesFlags(System.Reflection.ConstructorInfo, System.Reflection.BindingFlags)' at IL offset 0x15.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Utils.ReflectionUtils.MatchesFlags(System.Reflection.ConstructorInfo, System.Reflection.BindingFlags)' at IL offset 0x2E.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Utils.ReflectionUtils.MatchesFlags(System.Reflection.MethodInfo, System.Reflection.BindingFlags)' at IL offset 0x15.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Utils.ReflectionUtils.MatchesFlags(System.Reflection.MethodInfo, System.Reflection.BindingFlags)' at IL offset 0x2E.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Utils.ReflectionUtils.MatchesFlags(System.Reflection.FieldInfo, System.Reflection.BindingFlags)' at IL offset 0x15.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Utils.ReflectionUtils.MatchesFlags(System.Reflection.FieldInfo, System.Reflection.BindingFlags)' at IL offset 0x2E.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Utils.ReflectionUtils.MatchesFlags(System.Reflection.EventInfo, System.Reflection.BindingFlags)' at IL offset 0xB4.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Utils.ReflectionUtils.MatchesFlags(System.Reflection.EventInfo, System.Reflection.BindingFlags)' at IL offset 0xC9.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Utils.ReflectionUtils.MatchesFlags(System.Reflection.PropertyInfo, System.Reflection.BindingFlags)' at IL offset 0x15.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Utils.ReflectionUtils.MatchesFlags(System.Reflection.PropertyInfo, System.Reflection.BindingFlags)' at IL offset 0x2E.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Boolean Microsoft.Scripting.Utils.ReflectionUtils.MatchesFlags(System.Type, System.Reflection.BindingFlags)' at IL offset 0x20.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Security.Authentication.CipherAlgorithmType Security.Tls.MobileAuthenticatedStream.CipherAlgorithm.get()' at IL offset 0x24.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Security.Authentication.HashAlgorithmType Security.Tls.MobileAuthenticatedStream.HashAlgorithm.get()' at IL offset 0x24.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Security.Authentication.ExchangeAlgorithmType Security.Tls.MobileAuthenticatedStream.KeyExchangeAlgorithm.get()' at IL offset 0x24.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.IntPtr CoreText.CTParagraphStyle.CreateFromSettings(CoreText.CTParagraphStyleSettings)' at IL offset 0xCC.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method 'System.Int32 CoreAnimation.CATransform3D.GetHashCode()' at IL offset 0x22.
1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\ARM\ilc\IlcInternals.targets(936,5): error : ILT0042: Arrays of pointer types are not currently supported: 'System.Int16*[]'.__Arrays of pointer types are not currently supported: 'System.Single*[]'.__Arrays of pointer types are not currently supported: 'System.Int16*[]'.__Arrays of pointer types are not currently supported: 'System.Int16*[]'.__Arrays of pointer types are not currently supported: 'System.Single*[]'.__Arrays of pointer types are not currently supported: 'System.Single*[]'.__Arrays of pointer types are not currently supported: 'System.Int16*[]'.__Arrays of pointer types are not currently supported: 'System.Single*[]'.__
1>
1>Build FAILED.
1>
1>Time Elapsed 00:01:17.24
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

有人可以帮助我吗? :/ 我需要制作我的 PCL 项目的这个 UWP 版本...

【问题讨论】:

  • 嗨 Emixam,这个 PCL 是由 Xamarin 默认项目模板创建的吗?看起来我无法使用 Newtonsoft.Json V9.0.1 重现您的问题。你能创建一个简单的演示来重现这个问题吗?
  • 好的,我会尽量让你编辑;)
  • @Emixam23 你什么时候开始看到这个错误的?
  • 昨天...你知道吗,我通过重新创建项目解决了这个错误。但现在,发布工作正常,但图像(嵌入式资源)不起作用..跨度>
  • @Emixam23 那么对于原始问题,您解决了吗?图像(嵌入式资源)不起作用是什么意思?你能分享一下你的简单演示吗?

标签: build xamarin.forms uwp release


【解决方案1】:

我遇到了同样的问题。我花了好几天才弄清楚这一点。为了解决这个问题,我不得不从我的 UWP.csproj 文件中注释掉这一行。

<ItemGroup>
    <Reference Include="Xamarin.iOS">
      <HintPath>..\..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Xamarin.iOS.dll</HintPath>
    </Reference>
</ItemGroup>

我只能假设当我尝试将以下加载页面配方添加到我的应用程序时添加了这一行。有一次,我尝试将它作为客户渲染器添加到我的 UWP 应用程序中,并使用 UIKIT 进行添加,这是 iOS 的东西。我只是猜测,但也许就是这样。 https://developer.xamarin.com/recipes/ios/standard_controls/popovers/display_a_loading_message/

我还假设它在 Debug 下工作得很好,但由于 .Net Native 工具链选项正在尝试使用我的 UWP 应用程序编译 Xamarin.iOS.dll,因此在 Release 下没有构建。

我并不是说这是您的问题,但您的 UWP.csproj 文件中可能有一个类似的条目导致该问题。希望这会有所帮助。

【讨论】:

    【解决方案2】:

    确保您已将所有包更新到最新版本,您拥有 Visual Studio 2015 Update 3 和 Xamarin 的最新稳定版本。

    一些开发人员提到,如果您不使用英文版的 Visual Studio,构建发布应用程序包可能会导致问题 - 如果您不使用,请将其设置为 Tools -&gt; Options -&gt; International Settings

    【讨论】:

    • 嗨,好的,我现在试一试,但是,我的电脑或 Visual Studio 2015 都是英文的。 :) 谢谢!
    猜你喜欢
    • 2016-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-07
    • 2019-03-20
    相关资源
    最近更新 更多