maui icon indicating copy to clipboard operation
maui copied to clipboard

VS will no longer create a useable Maui project

Open sqlguy6212 opened this issue 3 years ago • 8 comments

Problem encountered on https://dotnet.microsoft.com/en-us/learn/maui/first-app-tutorial/run Operating System: windows

Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.

Create the project and all you get are:

Severity Code Description Project File Line Suppression State Error NU1202 Package Microsoft.Maui.Graphics.Win2D.WinUI.Desktop 6.0.501 is not compatible with net6.0-windows10.0.19041 (.NETCoreApp,Version=v6.0). Package Microsoft.Maui.Graphics.Win2D.WinUI.Desktop 6.0.501 does not support any target frameworks. MauiScrewupsPart2 C:\Visual Stuido Stuff\Maui\MauiScrewupsPart2\MauiScrewupsPart2.csproj

sqlguy6212 avatar Nov 02 '22 14:11 sqlguy6212

Not a solution here, but in my 2.5 months of building a .net Maui project for my company, I have run into unexplainable corruption in the project/build-process 5 times. I posted a couple of the errors here, but I didn't get a specific resolution. The reproducibility of the scenarios is just as difficult to reproduce as they are to fix, unless I were willing to upload my entire project (which would be unacceptable from an intellectual property perspective). The bad news is that for each of these situations, is I took the pragmatic approach and built a "new" maui project, and one-by-one rebuilt my project. That takes about 1-2hrs to get the "new" project "whole" again. Then it again compiles and builds a project. This is very frustrating, to be sure, however the payoff is so huge that it makes this incredibly complex platform so seductive in its promise, that I cannot leave it. I have generated a viable Android app, and today I am going back to my "tug-of-war" with the iOS side, to see if I can get that side of the project to be viable. So, assuming you just need to get the job done, my pragmatic advice is to recreate a new project and copy/paste your actual code back into the "new" project. Anytime you make a significant change to any of the configurations, or (especially) icons or graphics (which is astoundingly complex and fraught with gotchas), I advise you to try to build it again, just to keep the deltas between "when it last worked", and any new code changes introduced that cause it to "doesn't work anymore", easily revertible.

tradegear avatar Nov 02 '22 14:11 tradegear

I have had all sorts of problems like you describe. I was creating a new Maui app which has the same UI (sort of) as an Xamarin app. Now a simple thing like the wordwrap on the label is different on each and in the UI a description when longer than the width of the display would just run off the screen. I was trying just to create a new Maui app so I could do some tests without having to have a “real” app. So I was attempting to use the Maui app template which is presented by VS. The simple create makes a non-useable project which to me is beyond poor. The ultimate problem is that while not updating VS it will do something different too many times.

The fact that the project template would create something that is not useable is … (cannot think of a non rude word).

The other problems are that again too many times I would load my working project, and start to execute. In too many case I would have to try to execute 3-4 times before it would execute.

What I doing is an evaluation of Maui for several IT managers that I used to work with and right now I have to recommend against it and since using Xamarin is going to be a lame duck in the future I have to tell them that if they are willing to do as you have outlined then they can do work but they have to know that the VS and Maui combination is not really ready for use in production systems.

Lloyd

Sent from Mail for Windows

sqlguy6212 avatar Nov 02 '22 15:11 sqlguy6212

Hi @sqlguy6212. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Nov 02 '22 19:11 ghost

@sqlguy6212 Sorry to hear you're experiencing this issue! Could you attach a binlog so that we can investigate further?

@mattleibow any thoughts on this one?

rachelkang avatar Nov 02 '22 19:11 rachelkang

a lame duck in the future I have to tell them that if they are willing to do as you have outlined then they can do work but they have to know that the VS and Maui combination is not really ready for use in production systems. The ultimate problem is that while not updating VS it will do something different too many times.

I tried react native recently and found that it has the same issues, added to the fact that using js to organize things is a great mess. Except for the react paradigm, it's the same thing as xamarin/maui: the dev tools crashes, or suddenly stop working without notice after weeks of great work.

What you describe is the current state of universal mobile frameworks that try to bind ios android windows mac and others. They are fragile. It's the way they work. You have to work with that, and update your workflow in order to adapt to this "edge" development style.

It's not for accounting people !! It's not for some fragile dev teams !!

softlion avatar Nov 06 '22 07:11 softlion

Could you share your workloads installed?, do you have Windows App SDK installed?

jsuarezruiz avatar Nov 07 '22 15:11 jsuarezruiz

Hi @sqlguy6212. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Nov 07 '22 15:11 ghost

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

ghost avatar Nov 11 '22 16:11 ghost