未为“CompileAppManifest”任务指定所需参数“DefaultSdkVersion”的值

Dav*_*het 5 iphone ios maui

我正在尝试在 PC Visual Studio 2022 上的 iPhone 上测试我的 .Net MAUI 应用程序,该应用程序与装有 xCode 并安装了所有内容的 Mac 配对。我的 iPhone 已连接到 Mac,并且我正在尝试将其部署为 iOS 远程设备。

构建失败并出现以下错误:

错误 MSB4044:未为“CompileAppManifest”任务提供所需参数“DefaultSdkVersion”的值。

错误发生在 Xamarin.Shared.targets 中:

<CompileSceneKitAssets
        SessionId="$(BuildSessionId)"
        AppBundleName="$(_AppBundleName)$(AppBundleExtension)"
        Condition="'$(IsMacEnabled)' == 'true'"
        ToolExe="$(CopySceneKitAssetsExe)"
        ToolPath="$(CopySceneKitAssetsPath)"
        SceneKitAssets="@(SceneKitAsset)"
        IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)"
        TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
        ProjectDir="$(MSBuildProjectDirectory)"
        ResourcePrefix="$(_ResourcePrefix)"
        IsWatchApp="$(IsWatchApp)"
        SdkPlatform="$(_SdkPlatform)"
        SdkDevPath="$(_SdkDevPath)"
        SdkRoot="$(_SdkRoot)"
        SdkVersion="$(_SdkVersion)">
        <Output TaskParameter="BundleResources" ItemName="_BundleResourceWithLogicalName" />
Run Code Online (Sandbox Code Playgroud)

删除 bin 和 obj 文件夹没有帮助。

该应用程序在模拟器上成功运行。

缺什么?

Rya*_*son 0

执行“构建”而不是“重建”将使错误消失。不是解决问题,但至少是解决问题的方法。