aspnet / HttpAbstractions

[Archived] HTTP abstractions such as HttpRequest, HttpResponse, and HttpContext, as well as common web utilities. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
382 stars 193 forks source link

Could not AOT the assembly build failure with version 2.0.1 in Xamarin.iOS projects #974

Closed therealjohn closed 6 years ago

therealjohn commented 6 years ago

Functional impact

Adding the latest versions of this NuGet, or any NuGet that has it as a valid dependency that would pull in the latest version will cause a build failure for device builds in Xamarin.iOS projects.

Minimal repro steps

  1. Create a File > New Solution > Single View iOS Application. You can do these steps in VSMac or VS on Windows.
  2. Install-Package Microsoft.Net.Http.Headers -Version 2.0.1 for the iOS project in VS or use the Add Packages menu in VSMac to add this NuGet.
  3. Open the AppDelegate.cs file and add this line of code in the FinishedLaunching method.
    // Arbitrary type used from the package so it's included in the build
    new Microsoft.Net.Http.Headers.CacheControlHeaderValue();
  4. Change the build configuration to Debug | iPhone (Generic Device)
  5. Build the iOS project

Expected result

Build Success

Actual result

Build fails.

/Users/johnmiller/Projects/TestingSA/TestingSA/MTOUCH: Error MT3001: Could not AOT the assembly '/Users/johnmiller/Projects/TestingSA/TestingSA/obj/iPhone/Debug/mtouch-cache/Build/Microsoft.Net.Http.Headers.dll' (MT3001) (TestingSA)

Further technical details

Attached is the full build output. fullbuildoutput.txt Downgrading to version 2.0.0 of the package works around this issue.

If this is not the correct place to file the issue, please let me know!

nbsoftware commented 6 years ago

​I can confirm the issue. And I also confirm that downgrading to Microsoft.Net.Http.Headers package to 2.0.0 does work around it.

michelmoorlag commented 6 years ago

Same issue here when I try to build a XF IOS adhoc app. Downgrading Microsoft.Net.Http.Headers package to version 2.0.0 fixed the issue for me.

aspnet-hello commented 6 years ago

This issue was moved to aspnet/Home#2676