-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
How does updating of MAUI framework libs to a newer version works? #7069
Comments
|
I migrated it to an issue as I never got a helpful reply in the discussions. If MAUI Update are related to specific VS2022 updates, MAUI is dead on arrival. |
|
MAUI is a dotnet workload component, along with the platform (iOS, Android, macOS, etc) SDKs. These are versioned internally but are not directly exposed to you. The idea is that you would always run the newest version of any given workload, and if you wanted to run specific versions, you would run a install with a given rollback JSON file. But generally, you would either update by installing newer Visual Studio releases, which include workload updates. Or you would update via CLI with If you would like to know my (personal, not speaking for this team) feelings about the workload system, please read this issue comment, #6082 (comment). |
|
thanks for the information @drasticactions . So the update issues from the previews will continue in each future update after GA and we users have no control over this mess, so MAUI is doa. |
|
This sounds really scary. My experience with Xamarin.Forms is that updating it to a newer version has always been a very risky step and it required a lot of testing but, at least, I had a full control over it. I could upgrade when I had time for the testing, and I could also downgrade easily if there was a major bug. Unfortunately, this was very often. |
I fully agree with you, but as you can see no answer from official MAUI team, they will simply ignore the update issues and claim that newest version is always the best even if it completely broken for us. |
To be fair about that specific issue, I believe it has more to do with VS tooling rather than MAUI itself (Remember that MAUI workloads are through dotnet itself). I sympathize with your sentiment, however. I would slightly disagree that was "ignored" as comments like mine above point to. There is a constant ongoing discussion about how to improve the workload system, both before MAUIs release and now. For myself, that includes things like proper versioning. Again, I'm only speaking for myself, not any team. |
this has to be done before releasing something as "stable". During preview phase I had 6 VMs running as updating VS previews always broke something about MAUI. And I simply expected that proper versioning is done before the release, but it looks like MAUI had to be released at BUILD 2022. |
|
I am mostly concerned how these two situations will be handled for MAUI apps in production:
Please, correct me if I am wrong. Maybe I have just misunderstood how it works and maybe there will not be any problem in either of these situation. Even if I understand it well, I will be glad if you share your ideas on how would you cope with these two situations in MAUI. |
|
It seems like this thread is largely filled with people who are scared simply because there is some mystery around the toolchain... Hopefully this will help clarify some things for those who are a bit nervous. As a consultant, I can tell you that it is not at all uncommon for me to see people on old versions of Xamarin.Forms... But how do you pin your app to a specific version of MAUI? At first glance it may seem this is more difficult than it is, it just would be done differently. First remember that MAUI is part of the .NET SDK. This means that if you have 6.0.100 installed you get the version of MAUI that was released with that release of the SDK... if you have 6.0.200, then you get that version of MAUI. The answer quite bluntly is as simple as controlling the version of the .NET SDK that your project is using. You can find a lot of samples of how to do this in various Open Source repos including Prism. You can also read more about this in the global.json docs. {
"sdk": {
"version": "6.0.300",
"rollForward": "disable"
}
}In short adding a global.json as shown above would pin your project to that exact version of the .NET SDK & MAUI. If you want to continue working on that even while the rest of the world is on .NET 8 you can. IMHO this ultimately is going to be a best practice for MAUI devs as it will ensure that you are consistently working against the same version of the SDK from one Developer machine to the next, and that your CI build is also using the correct version of the SDK to avoid any surprises. I'd also like to address the unspoken fear. For those coming from Xamarin.Forms, if you've been around a while you've likely been severely affected at one point or another by updates to the native iOS/Android SDK's. The Version of Xamarin.Forms was built on an older one, or it is somehow different on your machine than it is on another developers machine or from the CI build host. It is really worth noting that as I understand it those iOS/Android SDK's are also part of the same .NET SDK which means that when you pin to a specific .NET version you're consistently getting the same native SDKs and version of MAUI everywhere you develop, build & publish. Hopefully this helps. |
|
Just adding a note, I have a workaround: https://github.com/mattleibow/DuplicateEntryMauiTest/blob/main/Directory.Build.targets |
How does updating of MAUI framework libs to a newer version works? In XF I can update the nuget package, compile and test if my apps still work. If I get issues I can undo the change without committing the changed csprojs. How does MAUI framework get updated? Only via new VS2022 update? What if I get a MAUI bug that blocks me? Restore my Windows to older restore point with older VS2022 and older MAUI version? And how do I know which MAUI version I compile my app against?
@StephaneDelcroix @davidortinau @PureWeen can anyone give an answer to this?
Originally posted by @MagicAndre1981 in #6730
The text was updated successfully, but these errors were encountered: