-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
InjectAvaloniaXamlOutput appears to mangle property IntermediateAssembly on multiple runs and prevents trimming #17099
Comments
Can you try latest nightly in a minimum sample? If it still is a bug for you, share the minimum sample please. |
The issue will be that In addition to a code sample, please compile with binary logging enabled and attach the |
https://github.com/noorez/AvaloniaTest17099 Test code which reproduces the issue |
MyLog.log Note, this didn't appear to produce any errors on output, however, Visual Studio and also msbuild from the console do produce the error |
I think what might be throwing off the msbuild target is the edit: didn't format above correctly to show it seemed to be the addition of ApplicationIcon to the android project which exposed the issue... |
This is the problem: it's running inner builds, and overriding the path to the intermediate assembly with its own value: The good news is that it also configures the |
Please try with the build from the linked PR (once it has been generated). |
pushed update to my test project to show that it works now (it also builds correctly on the actual project) |
while the issue with building was fixed and it produced the various android binaries, the app crashed, and this was taken from adb. It appears that perhaps the patch skipped too much when trying to avoid the additional transformation of the msbuild properties?
|
Please send another .binlog. |
Attached is the new binlog (test repo updated as well).
|
I think I finally found where thing go wrong. First, the project is built and everything is fine. Then the Android SDK executes a target of its own called As part of this second build, This seems to be the root cause of the problem: the SDK sometimes applies this Either way something breaks. |
any updates on how this can be fixed? |
I've not done anything more. Been busy with my actual job, and I'm also not well-placed to work on the issue as I don't have any of the bloated dependencies required to build and run Android applications. @MrJul please reopen this issue. |
Describe the bug
(For some reason this only appears on android builds..)
It looks like when InjectAvaloniaXamlOutput build target is run multiple times (for this case: (target "InjectAvaloniaXamlOutput" depends on it):) which has already run because "Compile" target required it, the path becomes mangled.
notice how there are now two /Avalonia/Avalonia nested directories when in fact all the build objects are only in Avalonia.
This in turn causes the trimmer targets to not look in the correct location for the assemblies which need to be trimmed
To Reproduce
Compile android targets when trimming enabled.
Expected behavior
previous version on which this worked without issue for me 11.1.999-cibuild0045786-beta. expect that it should also work in recent versions too.
Avalonia version
11.1.2
OS
Android
Additional context
No response
The text was updated successfully, but these errors were encountered: