Visual studio .NET MAUI windows build button is missing
Basically, i have this small MAUI project and somewhere along the way, the Windows deployment button is gone. I can no longer deploy and test on windows. I have no idea what i did wrong. Please, see my .csproj file and screenshot below. Maybe im missing something.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0-ios;net7.0-android</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.22621.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> -->
<OutputType>Exe</OutputType>
<RootNamespace>MAUIDependencySample</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Display name -->
<ApplicationTitle>MAUIDependencySample</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.example</ApplicationId>
<ApplicationIdGuid>0D7F5EAA-B445-45A1-9898-B9535F8F0DED</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">27.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>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Debug'">
<CodesignKey>Apple Development: example (PCQ252A654)</CodesignKey>
<!--<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>-->
<CodesignProvision>Example Development</CodesignProvision>
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net6.0-ios'">
<ProvisioningType>manual</ProvisioningType>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<!-- S开发者_JS百科plash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="1.2.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
<PackageReference Include="FirebaseDatabase.net" Version="4.1.0" />
<PackageReference Include="IdentityModel.OidcClient" Version="5.0.2" />
<PackageReference Include="LibBLEStandard" Version="1.0.5" />
<PackageReference Include="MauiLibBLE" Version="1.0.0" />
<PackageReference Include="Refractored.MvvmHelpers" Version="1.6.2" />
<PackageReference Include="System.ObjectModel" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<MauiXaml Update="Views\BarcodeScanView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\BluetoothFunctionsView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\HomeView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project>
So as you can see from the screenshot, there is no button to deploy to windows.
Info: im on the latest visual studio at the moment, 17.4.2. If i do a brand new MAUI project, i can see the windows button.
I have tried changing the target and minimum windows sdk version.
I have also tried going back and forth with .net 6 and 7, but still no luck.
Has anyone ever seen this before?
精彩评论