Forum Discussion

CCannon94's avatar
CCannon94
Copper Contributor
Jan 25, 2023
Solved

Developing a .NET MAUI app on a team using Visual Studio on both Windows and Mac

As the title states, our team consists of developers who use Visual Studio 2022 for Mac and for Windows. We are creating a cross-platform application using .NET MAUI, so I'd assume we should be able ...
  • CCannon94's avatar
    Jan 25, 2023

    Actually, typing this out helped us see the obvious solution. I need to add the "Condition" to both target lines.

     

    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net7.0-windows10.0.19041.0</TargetFrameworks>
    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('mac'))">$(TargetFrameworks);net7.0-maccatalyst</TargetFrameworks>

     

Resources