Search code examples
iosiphonemaui

The "CompileAppManifest" task was not given a value for the required parameter "DefaultSdkVersion"


I am trying to test my .Net MAUI app on my iPhone on PC Visual Studio 2022 that is paired to a Mac with xCode and everything installed. My iPhone is connected to Mac, and I am trying to deploy to it as an iOS Remote Device.

The build fails with the following error:

error MSB4044: The "CompileAppManifest" task was not given a value for the required parameter "DefaultSdkVersion".

The error happens in 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" />

Deleting bin and obj folder does not help.

The app runs successfully on simulators.

What is missing?


Solution

  • Doing a "Build" instead of a "Rebuild" will get the error to go away. Not a fix but at least a workaround to the problem.