-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Xamarin.Forms][Android] XA3001: Could not AOT the assembly: Microsoft.Graph.dll #1957
Comments
I should note this fails with both 5.12.0 and 5.13.0. Haven't tried other versions. |
@andrueastman: are you aware of any workarounds for this? Thanks. |
This is fixed in main of You can workaround it with this in your project:
|
Thanks, @NickDarvey. My project layout is as follows: Android csproj -> Xamarin.Forms csproj -> .NET Standard 2.0 assembly csproj -> Microsoft.Graph. I've added this to each of the three csproj files as follows: <ItemGroup>
<TrimmableAssembly Include="Microsoft.Graph" />
</ItemGroup> However, I still see the error archiving the Android project:
|
Oh, perhaps it's a different issue then. Sorry @mfeingol! I'd suggest capturing a binlog and opening an issue in either xamarin/xamarin-android or dotnet/runtime similar to this one. They're much more responsive. See also workaround described in dotnet/android#5764 |
@NickDarvey: thanks for the note. That second workaround doesn't help either. So ... do you know how I can capture a binlog for the Android "archive" function in VS? That's where the error happens. |
It looks like you can get the binlog by setting an envvar or this extension. |
@NickDarvey: unfortunately the extension lists no content when archiving, and the env var results in lots of logs that do not contain the word "Graph" so they do not appear to have useful data either. Any other suggestions? |
The env var would produce a In either case, if you open the binlog with a viewer it should mention 'graph' because your error mentions 'graph' (and the error will definitely be in there). |
@NickDarvey: please feel free to take a look at the output I did get. And there's no .binlog in my project directory. I'm guessing the Xamarin Android archive function doesn't use MSBuild... |
You should open an issue and share your binlog in xamarin/xamarin-android |
@NickDarvey: on closer look, this issue is a dup of dotnet/runtime#85917. I'm seeing the following text in diagnostic build logs:
@andrueastman: please cf this comment: dotnet/runtime#85917 (comment) - is there a way for Microsoft.Graph.dll to not include this many methods? I'm wondering why that's needed given my very minimal use of Graph in my app (essentially accessing a few OneDrive functions). |
I also filed dotnet/android#8274 for this. |
|
This should be resolved via #2182 and release https://www.nuget.org/packages/Microsoft.Graph/5.32.0 |
@andrueastman: this still isn't working.
|
@andrueastman: let me know if you need access to an app that reproduces the problem. Thanks. |
Describe the bug
After upgrading to Microsoft.Graph 5.x (from 4.x) I'm seeing the following error creating a release Android archive build:
XA3001: Could not AOT the assembly: Microsoft.Graph.dll
To Reproduce
I do not know if this reproduces 100% on all Xamarin.Forms Android projects or not.
Expected behavior
I'd expect to be able to successfully AOT this assembly.
Please let me know if you need additional information for this one. I will likely have to revert to 4.x.
Thanks.
The text was updated successfully, but these errors were encountered: