Visual Studio 2022中.NET MAUI依赖未识别问题求助
.NET MAUI依赖未识别问题求助
在Visual Studio 2022中已安装.NET MAUI及相关工具,但仍出现依赖未识别问题,耗时一周排查无果,无法运行代码,希望找到问题原因并获得解决建议。

以下是已安装的工作负载截图:

项目的.csproj文件内容如下:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <CheckEolWorkloads>false</CheckEolWorkloads> <TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks> <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks> <OutputType>Exe</OutputType> <RootNamespace>TodoApp</RootNamespace> <UseMaui>true</UseMaui> <SingleProject>true</SingleProject> <ImplicitUsings>enable</ImplicitUsings> <EnablePreviewMsixTooling>true</EnablePreviewMsixTooling> <!-- Display name --> <ApplicationTitle>TodoApp</ApplicationTitle> <!-- App Identifier --> <ApplicationId>com.companyname.todoapp</ApplicationId> <ApplicationId Condition="$(TargetFramework.Contains('-windows'))">39619FED-B5E5-409C-8125-60810F06A832</ApplicationId> <!-- Versions --> <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion> <ApplicationVersion>1</ApplicationVersion> <!-- Required for C# Hot Reload --> <UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter> <SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-ios'">14.2</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">14.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-android'">21.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</SupportedOSPlatformVersion> <TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion> </PropertyGroup> <ItemGroup> <!-- App Icon --> <MauiIcon Include="Resources\appicon.svg" ForegroundFile="Resources\appiconfg.svg" Color="#512BD4" /> <!-- Splash Screen --> <MauiSplashScreen Include="Resources\appiconfg.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 Condition="$(TargetFramework.Contains('-windows'))"> <!-- Required - WinUI does not yet have buildTransitive for everything --> <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.5" /> <PackageReference Include="Microsoft.Graphics.Win2D" Version="1.0.3.1" /> </ItemGroup> <ItemGroup> <None Remove="Resources\Images\check.png" /> <None Remove="Resources\Images\plus.png" /> </ItemGroup> <ItemGroup> <PackageReference Include="sqlite-net-pcl" Version="1.8.116" /> <PackageReference Include="SQLiteNetExtensions.Async" Version="2.1.0" /> <PackageReference Include="SQLitePCLRaw.core" Version="2.1.0-pre20220207221914" /> <PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.0-pre20220207221914" /> <PackageReference Include="SQLitePCLRaw.provider.dynamic_cdecl" Version="2.1.0-pre20220207221914" /> <PackageReference Include="SQLitePCLRaw.provider.sqlite3" Version="2.1.0-pre20220207221914" /> </ItemGroup> <ItemGroup> <MauiXaml Update="Views\OfficialFormPage.xaml"> <Generator>MSBuild:Compile</Generator> </MauiXaml> <MauiXaml Update="Views\OfficialListPage.xaml"> <Generator>MSBuild:Compile</Generator> </MauiXaml> </ItemGroup> <PropertyGroup Condition="$(TargetFramework.Contains('-windows'))"> <OutputType>WinExe</OutputType> <RuntimeIdentifier>win10-x64</RuntimeIdentifier> </PropertyGroup> </Project>
内容的提问来源于stack exchange,提问作者Nico A.L
相关产品推荐
相关产品推荐

