-
Notifications
You must be signed in to change notification settings - Fork 534
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
Related to "proguard rules embedded in binding projects are lost" #4449 #5310 #8523
Comments
Can you share a sample project that shows this problem? Thanks! |
@jonathanpeppers Will try to share something but first will check it on net8. |
Was able to reproduce it on NET8. Will work on sample to share. |
Will retest on latest workloads and let you know. |
@jpobst @jonathanpeppers I've retested on everything being updated (dotnet, workloads, VSMac, VSWin, etc.) and it can be easily reproduced on VSMac, VSWin and CLI builds. I've uploaded samples and mappings files in the private comment in this ticket https://developercommunity.visualstudio.com/t/Code-sample-for-https:githubcomxamar/10666925 |
@awattar sorry for the delay. I'm able to run Are there more specific steps to see the problem here? Can you share the steps in terms of A tester was also unsuccessful in reproducing the issue. |
@jonathanpeppers tried to reach you on Discord - but no response to my DM. You need to run into "incremental" mode. Please try this scenario:
App will deploy and run and will crash immediately with log entries suggesting proguard issue - also mapping.txt will have different size than normal. |
Is VS Mac required to cause the problem here? VS Mac is retiring next month:
The steps above are a fresh build. In what way is it incremental? |
@jonathanpeppers No VSMac is not required but this is a 100% repro. This is a "incremental" build in the way that if you add I can provide another scenario if you can't work on this one. |
Proguard/R8 rules do not do anything in
So, can your steps above be reduced to:
|
@jonathanpeppers Yes Regarding the steps you have provided I'm not quite sure - I believe it has something to do with separate initial Please try scenario with VSMac if you can. |
@awattar now that VS Mac is sunset, unsupported. Is there another way to reproduce this issue? |
Hi @awattar. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Hi @awattar. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you. |
Android application type
.NET Android (net7.0-android, etc.)
Affected platform version
VSMac 17.6.7 (build 417), VSWin 17.8.0, .NET 7.0.402
Description
When building MS.Android net7 Platfrom/Maui app with ProGuard/R8 enabled in release rules from dependent binding library containing library level ProGuard are not taken into account or malformed.
App crashes on runtime.
Related to #4449 and #5310.
Steps to Reproduce
Going straight to VS deploy (CLI
-t:Run
) for the removed bin/obj folders also doesn't work.It seems that restore + build causes creation of malformed mapping.txt (in bin framework/platform/architecture subfolder) file. FIle is significantly smaller than the working file +- 20%.
Did you find any workaround?
App must be explicitly rebuild (instead of build) or additional
--no-incremental
option must be added to CLIdotnet build
. It seems that some targets related to the ProGuard/R8 are not invoked fully or in the wrong moment for builds after project restore. Probably those builds are treated as incremental and due to some performance optimisations not all rules are taken into account.Relevant log output
No response
The text was updated successfully, but these errors were encountered: