Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Xamarin.Forms 5 MasterDetailPage renaming broke plugins #12224

Closed
Tommigun1980 opened this issue Sep 23, 2020 · 17 comments · Fixed by #12317
Closed

[Bug] Xamarin.Forms 5 MasterDetailPage renaming broke plugins #12224

Tommigun1980 opened this issue Sep 23, 2020 · 17 comments · Fixed by #12317
Labels
5.0.0 Regression on 5.0.0 a/masterdetailpage a/mdp i/regression in-progress This issue has an associated pull request that may resolve it! t/bug 🐛
Milestone

Comments

@Tommigun1980
Copy link

Tommigun1980 commented Sep 23, 2020

Hi.

I just updated to Xamarin.Forms 5 pre-1, and the NuGets in my project that reference MasterDetailPage broke. I'm not even using MDP in my projects, but some plugins refer to it.

I don't know in how many months (if ever) they will be updated, so how can I use Xamarin.Forms 5 in the meantime?

I think this is an irresponsible change as it may kill off projects that are dependent on legacy plugins, unless there is some kind of fallback for this. So what is the fallback, or should I just accept that due to this I may have to remake my entire project, if updates for the plugins don't materialise soon (hint: they never do)?

This change is an order of magnitude larger than just changing the branch name in GitHub. I hope you understand how much trouble this will cause if you decide to go with it, or at least provide some fallback for the plugin issue.

@Tommigun1980 Tommigun1980 added s/unverified New report that has yet to be verified t/bug 🐛 labels Sep 23, 2020
@samhouts samhouts added this to New in Triage Sep 23, 2020
@PureWeen
Copy link
Contributor

@Tommigun1980 it shouldn't have broke it can you provide a repro or more information please?

@Tommigun1980
Copy link
Author

Tommigun1980 commented Sep 23, 2020

@PureWeen really good to hear it was not by design, phew! Thanks so much for the info, I got scared there for a while :)

I re-applied the stash with my Xamarin.Forms 5 changes, and now it works for some reason. I did clean the project both times before building. The error, which I didn't save, was within a renderer that was referring to the MDP inside a commercial plugin, something about the MDP assembly not being found or similar.

Really happy the error went away by itself! Feel free to close this, or keep open in case you want to debug why it didn't work the first time.

I'll try to give some more info about the what happened when the error materialised:

  • I updated Xamarin.Forms to 5, cleaned and rebuilt
  • Got some errors so fixed them according to the Xamarin.Forms 5 update guide
  • Built again, but got the MDP error from inside a plugin
  • Stashed my changes and filed this report

After reading your post that it shouldn't break plugins:

  • Restarted VS For Mac
  • Re-applied stash
  • Cleaned and built the project
  • Now it works

@Tommigun1980
Copy link
Author

Maybe restarting VS in-between was key? I tried cleaning and rebuilding multiple times before restarting it and got the error every time.

@rmarinho
Copy link
Member

Do you know what error appear ?

@rmarinho rmarinho added the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Sep 24, 2020
@rmarinho rmarinho moved this from New to Needs Info in Triage Sep 24, 2020
@Tommigun1980
Copy link
Author

Tommigun1980 commented Sep 29, 2020

Hi @PureWeen and @rmarinho.

I got the error again just by building. It is as follows:

/Users/me/Projects/myproject/MyProject.iOS/MTOUCH: Error MT2101: Can't resolve the reference 'System.Boolean Xamarin.Forms.IMasterDetailPageController::get_ShouldShowSplitMode()', referenced from the method 'System.Void SomePlugin.SomeRenderer::WillRotate(UIKit.UIInterfaceOrientation,System.Double)' in 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. (MT2101) (MyProject.iOS)

This is the first time I'm doing release builds with Xamarin.Forms 5, and cleaning the workspace and building again doesn't make the error go away, so I can't make release builds atm.

Please advice.

@PureWeen
Copy link
Contributor

@Tommigun1980 what's the name of the plugin?

@Tommigun1980
Copy link
Author

@Tommigun1980 what's the name of the plugin?

Hi @PureWeen. Is there any way I could send this info privately?

Thanks.

@PureWeen
Copy link
Contributor

@Tommigun1980 shneuvil at Microsoft.com

@PureWeen
Copy link
Contributor

@samhouts samhouts added 5.0.0 Regression on 5.0.0 a/masterdetailpage i/regression and removed s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/unverified New report that has yet to be verified labels Sep 30, 2020
@samhouts samhouts added this to the 5.0.0 milestone Sep 30, 2020
@samhouts samhouts moved this from Needs Info to Ready For Work in Triage Sep 30, 2020
@samhouts samhouts added the a/mdp label Sep 30, 2020
@samhouts samhouts moved this from Ready For Work to Needs Estimate in Triage Oct 1, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Oct 1, 2020
@samhouts samhouts added this to In Progress in vNext+1 (5.0.0) Oct 1, 2020
@Tommigun1980
Copy link
Author

Tommigun1980 commented Oct 2, 2020

@Tommigun1980 can you test the nugets from the build here?

https://dev.azure.com/xamarin/public/_build/results?buildId=27784&view=artifacts&type=publishedArtifacts

Hi @PureWeen, I would love to but I can't seem to download anything from there? The "folders" are not clickable for me.
Might it be a permission issue?

@workgroupengineering
Copy link
Contributor

immagine
immagine

@Tommigun1980
Copy link
Author

Tommigun1980 commented Oct 2, 2020

Thanks @workgroupengineering, such weird ui :)

@PureWeen Thanks for the updated package. The previous error no longer happens after updating, but there's a new error instead (that probably was not hit last time due to the MDP error):

/Users/myname/Projects/myproject/MyApp.iOS/MTOUCH: Error MT2101: Can't resolve the reference 'Xamarin.Forms.MediaSource', referenced from the method 'System.Void Xamarin.CommunityToolkit.UI.Views.MediaCapturedEventArgs::.ctor(System.String,System.Byte[])' in 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. (MT2101) (MyApp.iOS)

This time it seems to be the Xamarin Community Toolkit. I installed it when I updated to Xamarin.Forms 5 as I was using the expander component, and the release notes said to install the community toolkit in that case.

These errors don't happen in debug builds, only in release builds (I have optimised complier turned on).

Thanks.

@PureWeen
Copy link
Contributor

PureWeen commented Oct 2, 2020

@Tommigun1980 yea I have to tell people about those dots a lot :-/

I think that error should go away once the next XCT version is out with MediaSource all merged in to XCT

@Tommigun1980
Copy link
Author

@Tommigun1980 yea I have to tell people about those dots a lot :-/

I think that error should go away once the next XCT version is out with MediaSource all merged in to XCT

UI elements that only show up when hovering the mouse over an area are quite... exotic, indeed :D

Thanks for the additional info. In that case I'll wait and take this bug there if it's not resolved. Or should it be here as XCT is the update path for certain Xamarin.Forms 4 features, or has responsibility been shifted over completely?

Thanks again.

@PureWeen
Copy link
Contributor

PureWeen commented Oct 2, 2020

I asked @jsuarezruiz about it and there are already PRs for XCT that will soon be merged that should fix that exception.

Any issues you have with XCT should just get logged with XCT

@PureWeen
Copy link
Contributor

PureWeen commented Oct 2, 2020

Also, @Tommigun1980 thank you for this issue and testing the nuget!!!

@Tommigun1980
Copy link
Author

Thanks for the additional info, and for fixing this! I'll go ahead and close this issue now as the original error has been solved 👍

Triage automation moved this from Needs Estimate to Closed Oct 2, 2020
vNext+1 (5.0.0) automation moved this from In Progress to Done Oct 2, 2020
samhouts pushed a commit that referenced this issue Oct 9, 2020
* Leave IMasterDetailPageController intact

* - call correct base api

* Update IFlyoutPageController.cs

fixes #12224
@samhouts samhouts removed this from Closed in Triage Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
5.0.0 Regression on 5.0.0 a/masterdetailpage a/mdp i/regression in-progress This issue has an associated pull request that may resolve it! t/bug 🐛
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants