maddymontaquila / maui-migration-samples

Help the .NET MAUI team make robust tooling to get folks updated to .NET MAUI!
16 stars 0 forks source link

[MIGRATION] Can't run project on android and ios. Built successfully after migration. #5

Open shivamsaviant opened 2 years ago

shivamsaviant commented 2 years ago

Environment

Are you on Windows or Mac: Windows Visual Studio Version: VS 22 Version 17.3.0 Preview 5.0 .NET version dotnet --version: 6.0.400-preview.22330.6 MAUI version installed:

Your code

Is it an app or a library? App What platforms does it target? android and ios Is it Xamarin.Forms? What version? (PS we recommend only migrating XF 5+) Yes, 5.0.0.2012 Do you use Xamarin.Essentials? No Is your app/library open source? Share the link! No If it isn't OSS, would you be willing to show someone on our team some code in a video call? Yes

Migration

Did you follow the steps on the migration wiki Yes Was it successful? Yes What went wrong? Details please! It built successfully, but not able to run on emulator/device. After running dotnet build <path_to_Android_csproj_file> -f net6.0-ios -t:Run command, it give below error. C:\Program Files\dotnet\sdk\6.0.400-preview.22330.6\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(901,5): error MSB3072: The "Exec" task needs a command to execute. C:\Program Files\dotnet\sdk\6.0.400-preview.22330.6\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(901,5): error MSB6011: Invalid parameters passed to the Microsoft.Build.Tasks.Exec task. [ ] I couldn't finish the steps [ ] It didn't build after I finished migrating [ ] I need NuGets that aren't compatible with MAUI yet [ ] It built, but the layout/UI is all messed up [ ] I have no idea what happened, please help!!!

Share some details on your migration. Feel free to add screenshots/before + afters, video walkthroughs, blogs, or angry rants. Particularly - what .csproj properties did you get rid of and what could you keep? What code changes did you have to make in your C# and XAML?

What NuGets do you have that don't work for MAUI yet? NA

Custom Renderers (optional)

Do you have custom renderers in your app? Did you use the MAUI compat package with them, and did it worK? Did you try to rewrite your renderers to the handler architecture? How did that go?

Upgrade Assistant (optional)

Did you use the upgrade assistant to try to upgrade? Did it work?