MAUI Dependencies cause issues when updating the MAUI workload with 3rd party dependencies
See original GitHub issueDescription
The issue was first reported by @rdavisau in the SponsorConnect Discord. After updating to MAUI SR1 a project with 3rd party dependencies built against MAUI GA caused a NuGet Dependency downgrade that broke the build. This seems to be caused by a NuGet dependency which is added to libraries which have UseMaui
. As discussed with @Redth these dependencies probably shouldn’t be added to NuGet packages built against MAUI
NuGet Dependencies that are automatically added
Resulting error after updating to SR1
Reproduction: https://github.com/rdavisau/maybe-update-maui
Steps to Reproduce
- Create a MAUI app
- Add Community Packages that were built against the MAUI GA
- Use SR1
Version with bug
6.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS, Other (Tizen, Linux, etc. not supported by Microsoft directly)
Affected platform versions
all
Did you find any workaround?
No response
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:27 (25 by maintainers)
Top Results From Across the Web
MAUI Dependency error - Microsoft Q&A
Hi, I'm trying to create a new project in MAUI but I get dependency errors. I have VS Community installed and updated with...
Read more >Telerik UI for .NET MAUI pkg & MAUI Workload Mismatch ...
NET MAUI pkg still has the dependency on MAUI Workload, ... We then release Telerik UI for MAUI v2 with the updated WinAppSDK...
Read more >Is Maui dead on arrival? : r/dotnet
I always found 3rd party controls more trouble than they're worth. But I've never worked at a company with demanding UI standards.
Read more >How can i resolve .net MAUI dependencies errors?
NET MAUI. But after creating a new Project, i have dependencies errors, especifically Nuget packages... Click to See Image. I did try to...
Read more >Is Your Xamarin.Forms Project Ready For Migration To MAUI?
You will need to update via command line to install the MAUI workload. You can find the guide here. Once your new project...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For now here’s a workaround you can use in your library projects to rebuild them without containing the dependency. Add this to your library project which you are packaging into a nuget:
What seems to be happening here is the
Microsoft.Maui.Dependencies
andMicrosoft.Maui.Extensions
are flowing through indotnet pack
of libraries usingUseMaui
when they really should not be.Looking into how we can 1) work around this, and 2) fix this behaviour going forward…