Open santo998 opened 4 days ago
When you update MAUI nugets from 8 to 9 version you also have to change the .net version in .csproj from net8.0 to net9.0. Refer to docs for more details https://learn.microsoft.com/en-us/dotnet/maui/whats-new/dotnet-9?view=net-maui-9.0#upgrade-from-net-8-to-net-9
@OvrBtn so, can't I update to MAUI 9 using .NET 8?
Then, shouldn't developers specify that MAUI 9 nuget requires .net 8, so it would give me an error when trying updating it?
@OvrBtn so, can't I update to MAUI 9 using .NET 8?
Then, shouldn't developers specify that MAUI 9 nuget requires .net 8, so it would give me an error when trying updating it?
Correct, I've updated the title of this issue
We should really throw a better exception when users are trying to reference net9 nugets inside a net8 project
Another option here is to actually drop netstandard and use net47 or something for the IDE only? In our targets we can use net9.0 in apps and net4x in the IDE.
We lose the netstandard, but that is something we actually want, right?
@Redth @PureWeen @mgoertz-msft @mauroa @jonathanpeppers @dellis1972 any thoughts on this?
Another option here is to actually drop netstandard and use net47 or something for the IDE only? In our targets we can use net9.0 in apps and net4x in the IDE.
We lose the netstandard, but that is something we actually want, right?
@Redth @PureWeen @mgoertz-msft @mauroa @jonathanpeppers @dellis1972 any thoughts on this?
Not sure I get how using netstandard for the sdk stuff is related to this issue?
I can solve the problem by removing netstandard from the nuget package and instead building for net47. Does the Android workload have netstandard2.0 build tasks, or does it multitarget net8.0 and net4x?
I can either write a complex logic to detect a scenario where the user installed newer nugets into an older project - like maui 9 into net8 and then throw an error. Or, we can let NuGet install fail with a useful error message.
We only use netstandard2.0 cos it works everywhere.
OK, thanks!
I created a PR to report an error: https://github.com/dotnet/maui/pull/25993
@Redth should I investigate dropping netstandard and adding netfx as a TFM for msbuild tasks? That will be more work and require more changes. aka: scary But is maybe more correct and then NuGet does the real TFM work.
Description
In a class under my Windows platform folder, the following types are missing: Microsoft.UI.Xaml.Application Microsoft.UI.Xaml.UnhandledExceptionEventArgs
This happened after updating these packages: Microsoft.Maui.Controls 8.0.92 → 9.0.10 Microsoft.Maui.Controls.Compatibility 8.0.92 → 9.0.10
This is my .csproj (targeting net8.0-*)
```xmlSteps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
9.0.10 SR1
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.92 SR9.2
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output