dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.28k stars 1.76k forks source link

MAUI on .NET 7 RC1 not buildable in Visual Studio?! #9321

Closed Fabi closed 2 years ago

Fabi commented 2 years ago

Description

A few weeks ago I used the .NET 7 bits on my MAUI project and it worked just fine. However recently it stopped working in Visual Studio (latest preview) with .NET 7 RC1 branch/rollback file. On command line it seems to build just fine.

Steps to Reproduce

  1. Install .NET 7 RC1 from dotnet/installer
  2. Install MAUI using rollback file https://aka.ms/dotnet/maui/net7.0.json
  3. Create new MAUI project on .NET 7 & build it

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

Windows, I was not able test on other platforms

Affected platform versions

All Windows platforms.

Did you find any workaround?

Nope

Relevant log output

1>C:\Users\FabianKönig\.nuget\packages\microsoft.windowsappsdk\1.1.3\buildTransitive\Microsoft.Build.Msix.Packaging.targets(146,5): error : Improper project configuration: no AppxManifest is specified, but WindowsPackageType is not set to MSIX.
1>Done building project "Arctium.App.csproj" -- FAILED.
1>C:\Program Files\dotnet\sdk\7.0.100-rc.1.22409.23\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(368,5): error NETSDK1073: The FrameworkReference 'Microsoft.Maui.Core' was not recognized
1>C:\Program Files\dotnet\sdk\7.0.100-rc.1.22409.23\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(368,5): error NETSDK1073: The FrameworkReference 'Microsoft.Maui.Controls' was not recognized
1>C:\Program Files\dotnet\sdk\7.0.100-rc.1.22409.23\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(368,5): error NETSDK1186: This project depends on Maui Essentials through a project or NuGet package reference, but doesn't declare that dependency explicitly. To build this project, you must set the UseMauiEssentials property to true (and install the Maui workload if necessary).
1>C:\Program Files\dotnet\sdk\7.0.100-rc.1.22409.23\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(368,5): error NETSDK1073: The FrameworkReference 'Microsoft.MacCatalyst' was not recognized
1>Done building project "Arctium.App.csproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
jfversluis commented 2 years ago

Unfortunately .NET 7 and .NET MAUI aren't friends right now. To be able to use .NET MAUI you will need to use .NET 6. We're hoping to change that soon!