Microsoft.Graphics.Canvas.winmd cannot be referenced MAUI Error

If you get this error and you target only  android or ios environment please check your project file and delete this code block. 

	<ItemGroup Condition="$(TargetFramework.Contains('-windows'))">
		<!-- Required - WinUI does not yet have buildTransitive for everything -->
		<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
		<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.0.0.30" />
	</ItemGroup>

 

Maui WinUI project Unable to start debugging error

Due to a bug we are unable to debug and run WinUI projects in .net 6.0.100 preview 7.21379.14. It was said that the Visual Studio team will fix this with an update. Temporarily, after you deploy your projects, you can run them without debugging by typing the solution name of the start menu.