Closed juwens closed 1 year ago
Thanks for the issue report @juwens! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS.
If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.
This issue will be automatically closed in 3 days if there are no further comments.
Jesus, can you (the project team, not you personally) please stop playing the pingpong (report in VS) thing, i'm so tired of this attitude. Take responsibility for the maui issues, and don't frustrate customers even more. No it's not a VS issue. This is a maui architectural design issue and the way YOU choose to distribute it with dotnet workload!
So instead of saying "report to VS", can you (for the love of god) PLEASE provide the developers out there with a way, on how to downgrade maui-sdk (which is handled by dotnet workload, not VS!!).
sudo dotnet workload update --from-rollback-file https://maui.blob.core.windows.net/metadata/rollbacks/7.0.52.json
worked for me on mac, but didn't work on Windows (still installs 7.0.58).
For mac it's even worse because it asks you to upgrade to xcode 14.2 which isn't even supported by Visual Studio for Mac so basically you have a broken environment without an obvious way to roll-back...
@mattleibow - can you confirm that this issue should move to VS Feedback?
Reading stuff like this will stop me from updating visual studio.... Please change the way we can update .net maui. Nuget seems to be a lot better for all of us. So anyone can decide which version of maui to use...
put this in your .csproj
<!-- Pin the MAUI version -->
<MauiVersion>7.0.52</MauiVersion>
@Hooterr thanks for the suggestion.
sudo dotnet workload update --from-rollback-file https://maui.blob.core.windows.net/metadata/rollbacks/7.0.52.json
worked for me on mac, but didn't work on Windows (still installs 7.0.52).For mac it's even worse because it asks you to upgrade to xcode 14.2 which isn't even supported by Visual Studio for Mac so basically you have a broken environment without an obvious way to roll-back...
I tried that previously and just again now after you suggested it, sadly it seems, it doesn't do any significant change.
dotnet workload list
lists 7.0.58, as before.
Maybe i am misinterpreting the output of the tool 🤔 Does it only show the latest version of installed SDKs?
Because, if i do dir 'C:\Program Files\dotnet\packs\Microsoft.Maui.Sdk\'
, 7.0.52 & 7.0.58 are installed.
.
|--= 7.0.52
| \--- Sdk
| |--= AutoImport.props
| |--= BundledVersions.targets
| |--= maui-blazor.aotprofile
| |--= maui.aotprofile
| |--= Microsoft.Maui.Controls.Build.Tasks.dll
| |--= Microsoft.Maui.Controls.Build.Tasks.pdb
| |--= Microsoft.Maui.Controls.DefaultItems.targets
| |--= Microsoft.Maui.Controls.dll
| |--= Microsoft.Maui.Controls.pdb
| |--= Microsoft.Maui.Controls.props
| |--= Microsoft.Maui.Controls.Sdk.After.targets
| |--= Microsoft.Maui.Controls.Sdk.targets
| |--= Microsoft.Maui.Controls.SingleProject.props
| |--= Microsoft.Maui.Controls.SingleProject.targets
| |--= Microsoft.Maui.Controls.SourceGen.dll
| |--= Microsoft.Maui.Controls.SourceGen.pdb
| |--= Microsoft.Maui.Controls.targets
| |--= Microsoft.Maui.Controls.Xaml.dll
| |--= Microsoft.Maui.Controls.Xaml.pdb
| |--= Microsoft.Maui.Core.props
| |--= Microsoft.Maui.Core.Sdk.After.targets
| |--= Microsoft.Maui.Core.Sdk.targets
| |--= Microsoft.Maui.Core.targets
| |--= Microsoft.Maui.dll
| |--= Microsoft.Maui.Essentials.dll
| |--= Microsoft.Maui.Essentials.pdb
| |--= Microsoft.Maui.Graphics.dll
| |--= Microsoft.Maui.Graphics.pdb
| |--= Microsoft.Maui.pdb
| |--= Microsoft.Maui.Sdk.After.targets
| |--= Microsoft.Maui.Sdk.targets
| |--= Mono.Cecil.dll
| |--= Mono.Cecil.Mdb.dll
| |--= Mono.Cecil.Mdb.pdb
| |--= Mono.Cecil.pdb
| |--= Mono.Cecil.Pdb.dll
| |--= Mono.Cecil.Pdb.pdb
| |--= Mono.Cecil.Rocks.dll
| |--= Mono.Cecil.Rocks.pdb
| |--= Sdk.targets
| |--= System.CodeDom.dll
| |--= WinUI.targets
| \--- WinUI.Unpackaged.targets
\--- 7.0.58
\--- Sdk
|--= AutoImport.props
|--= BundledVersions.targets
|--= maui-blazor.aotprofile
|--= maui.aotprofile
|--= Microsoft.Maui.Controls.Build.Tasks.dll
|--= Microsoft.Maui.Controls.Build.Tasks.pdb
|--= Microsoft.Maui.Controls.DefaultItems.targets
|--= Microsoft.Maui.Controls.dll
|--= Microsoft.Maui.Controls.pdb
|--= Microsoft.Maui.Controls.props
|--= Microsoft.Maui.Controls.Sdk.After.targets
|--= Microsoft.Maui.Controls.Sdk.targets
|--= Microsoft.Maui.Controls.SingleProject.props
|--= Microsoft.Maui.Controls.SingleProject.targets
|--= Microsoft.Maui.Controls.SourceGen.dll
|--= Microsoft.Maui.Controls.SourceGen.pdb
|--= Microsoft.Maui.Controls.targets
|--= Microsoft.Maui.Controls.Xaml.dll
|--= Microsoft.Maui.Controls.Xaml.pdb
|--= Microsoft.Maui.Core.props
|--= Microsoft.Maui.Core.Sdk.After.targets
|--= Microsoft.Maui.Core.Sdk.targets
|--= Microsoft.Maui.Core.targets
|--= Microsoft.Maui.dll
|--= Microsoft.Maui.Essentials.dll
|--= Microsoft.Maui.Essentials.pdb
|--= Microsoft.Maui.Graphics.dll
|--= Microsoft.Maui.Graphics.pdb
|--= Microsoft.Maui.NuGets.Sdk.targets
|--= Microsoft.Maui.pdb
|--= Microsoft.Maui.Sdk.After.targets
|--= Microsoft.Maui.Sdk.targets
|--= Mono.Cecil.dll
|--= Mono.Cecil.Mdb.dll
|--= Mono.Cecil.Mdb.pdb
|--= Mono.Cecil.pdb
|--= Mono.Cecil.Pdb.dll
|--= Mono.Cecil.Pdb.pdb
|--= Mono.Cecil.Rocks.dll
|--= Mono.Cecil.Rocks.pdb
|--= Sdk.targets
|--= System.CodeDom.dll
|--= WinUI.targets
\--- WinUI.Unpackaged.targets
@LennoxP90
put this in your .csproj
<!-- Pin the MAUI version --> <MauiVersion>7.0.52</MauiVersion>
How sure are you, that this suggestion works?
Please do not use MauiVersion property going forward, it is no longer supported. https://github.com/dotnet/maui/issues/4812#issuecomment-1075583594
nothing broke haha, I guess you can never know but in all honesty there should be a way to pin the version outside of Visual studio that can be directly sourced with the application, just blanketly saying don't use x feature without an alternative is pure insanity
@LennoxP90
nothing broke haha, I guess you can never know but in all honesty there should be a way to pin the version outside of Visual studio that can be directly sourced with the application, just blanketly saying don't use x feature without an alternative is pure insanity
There definitely should be a way to pin a version, like with nugets.
I'm really eager to get to the bottom of this MauiVersion thing, but apparently with .Net 7 "MauiVersion" does nothing. At least i cannot find any code in the Maui-Repo with this phrase.
if it is used, it should appear be at least in some files (props, targets, cs, ...), right? Like it did in the .Net 6 times.
@Redth, is there a reason MauiVersion was removed? is there alternative we should be using?
I tried that previously and just again now after you suggested it, sadly it seems, it doesn't do any significant change.
Didn't work for me on Windows either, but worked on my Mac. Go figure.
I remember during the recent MAUI standup someone from MS said that the thing with workloads is that they're 'Trying to build a bus while driving it' , which probably means we'll all end up in a ditch by the side of the road, wheels up lol (don't ban me, please, I'm just trying to bring attention to the issue)
@LennoxP90 i did some further research concerning MauiVersion.
It's still there, github's search engine is just garbage.
I found it at several places:
And i can confirm, that it still kinda work's despite the comment https://github.com/dotnet/maui/issues/4812#issuecomment-1075583594 (from march 2022) that it is not supported anymore.
It uses the assemblies from the specified Version for running the app, so your App has loaded 7.0.52 maui assemblies, when you set MauiVersion=7.0.52
BUT it uses the latest installed maui SDK to BUILD the app. (which would be 7.0.58). <- confirmed that with binlog
I can only guess, that this discrepancy is the reason, why it is not recommended.
that could explain when i removed the <MauiVersion>
that my app behaved differently as in regressions from latest Maui
@juwens is right on every point! Exactly.
This issue is being closed due to inactivity. If this issue is still affecting you, please follow the steps above to use the VS Feedback Tool to report the issue.
And again, the Maui team closes an unfixed issue as “completed”.
I’m speechless.
Despite you call the property MauiVersion, which was deprecated a long time ago and solves only half of the problem, a “solution”.
This is disappointing 😞
How is this considered resolved??
@mattleibow said @juwens is right.... hmmm ok. I say @juwens is right again on every point! I don´t understand as well, how this issue can be closed as "completed".
Hi, this issue was closed perhaps by mistake. We initially thought it should move to VS Feedback, but that is perhaps not true. I re-opened this for further consideration.
There are some upcoming changes in .NET 8 / MAUI that I think could help this, via to some MAUI workload changes here: https://github.com/dotnet/maui/pull/11206
@Eilon This is great. But one question: Am I supposed to not upgrade VS until .net 8 is available? We are about to release a bigger app for a customer. It has happened in the past, that a new maui release brought back old bugs. On the other hand new releases may contain needed fixes. I´m not sure how to handle this, Any suggestions?
Upgrading VS should be fine, especially to non-preview releases. Right now I don't think there's any good way to downgrade the SDK version, but at least theoretically, it also shouldn't be necessary. It's possible that some versions introduce regressions, but those regressions are themselves considered bugs, and should be fixed.
the regression is pretty much constant, I have been developing my app with MAUI since its first GA and Microsoft basically abandoned Xamarin and forced my hand but as anything collectionview, listview issues are a constant broke fix broke state every release.
Starting with .NET 8 / MAUI I think the MAUI workload change in https://github.com/dotnet/maui/pull/11206 would help resolve this type of issue because you'll have more control over which version of MAUI each project/app uses.
so we have to wait another 8 months, got it
<MauiVersion>
is deprecated because we don't want people to use it - because it is not perfect/satisfactory, however I am loosely un-deprecating it until we get the nugets PR merged and released.
@juwens is correct in that in order to load maui, we need a starting point. And that starting point is the version that came with VS. Then, <MauiVersion>
goes ahead and replaces the maui that your apps uses. In the comment by @juwens he explains exactly why we deprecated the <MauiVersion>
- it causes this very confusion. If you are to look further in the binlog, you can see that the only place we use the on-disk version is to load the <MauiVersion>
version of the assemblies - and some build tasks used to get things going.
This issue is closed in that there are 2 ways to downgrade a maui app:
If there is an issue with MauiVersion (besides the label of deprecated), then please open an issue specifically on that. It should work - deprecation at this point is just a label. However, maybe in net8 it will really be deprecated, so that is why I am working hard to get the PR merged and tested and released so that none of this version mismatch happens.
Description
We have several issues with the 7.0.58 and want to go back to 7.0.52. For example https://github.com/dotnet/maui/issues/11579 but also things like this
C:\Program Files\dotnet\sdk\7.0.102\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: ios [D:\gitlab\builds\QFfMLjaN\0\Foo\Bar\Baz.csproj::TargetFramework=net7.0-ios]
despite ios and maui-ios is already installed with maui-workload of VS.Depending on when people installed there VS, some colleagues/build-servers have 7.0.52, others have 7.0.58.
Dotnet workload provides no obvious way to downgrade.
What is your suggested way to downgrade the installed maui-sdk from 7.0.58 to 7.0.52.
We are on .net sdk 7.0.102.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/dotnet/maui
Version with bug
7.0 (current)
Last version that worked well
7.0 (current)
Affected platforms
iOS, Android, Windows, Other (Tizen, Linux, etc. not supported by Microsoft directly)
Affected platform versions
all
Did you find any workaround?
no
Relevant log output
No response