Current Code does not build in 17.2 Preview 5
UweReisewitz opened this issue · comments
Hi,
thank you very much for the merge. Unfortunately there is a bug in Preview 5 that causes libraries with UseMaui=true to fail during build with the following message:
C:\Program Files\dotnet\packs\Microsoft.Maui.Sdk\6.0.300-rc.2.5513\Sdk\WinUI.NetCore.targets(188,5): error MSB4057: The target "CopyLocalFilesOutputGroup" does not exist in the project.
For "Full" Maui-Libraries (that have full platform support) it is possible to update the csproj file to the new format:
<TargetFrameworks>net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
and
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
This doesn't seem to work if the library is just using Net-6.0 and UseMaui=true. Maybe this needs to be reported to the Maui-Team, because they think modifying the project file solves the issue...
Do you see this behaviour as well?
I have reported this to the Maui team
Updating the csproj was actually part of the plan.. you are correct that there were changes to the MAUI templates
I'm closing this as I cannot duplicate the issue.
Please see my comment here:
#17 (comment)