Reputation: 5395
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?
Upvotes: 6
Views: 2720
Reputation: 11
I tried all, delete bin and obj, build vs rebuild. This seems to have worked: (my Macbook was not paired, so be sure it's paired), then after I paired my Mac, I still had problems, but I disconnected and reconnected my iPhone and then it worked.
Upvotes: 1
Reputation: 108
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.
Upvotes: 1
Reputation: 1629
According to @RyanWatson, Change "Rebuild" to "Build" and it will work without errors.
Upvotes: 1
Reputation: 31
I had the same problem but with an iPad.
Steps to "Fix":
After this, I got "error MT1007: Failed to launch the application", but then it deployed properly.
Upvotes: 3