xamarin.shared.sdk.targets(366,3)MessagingRemoteexception,ExcregateException和NotimplempledException
我正在运行此命令
dotnet publish -f:net6.0-ios -c:Release
来构建.NET MAUI应用程序,并为iOS创建 .IPA文件( .csproj in end)
,我会收到此错误:
c:\ program 文件\ dotnet \ packs \ microsoft.ios.sdk \ 15.4.303 \ targets \ xamarin.shared.sdk.targets(366,3): 错误: MessagingRemoteexception :客户端构建时发生了错误 在执行主题XVS/build/execute-task/onesiemobile/的回复时/ 18E8F3C002FMergeAppbundles [c:\ development_buildPipeline \ onesiemobile \ onesiemobile \ onesiemobile.csproj]
c:\ program 文件\ dotnet \ packs \ microsoft.ios.sdk \ 15.4.303 \ targets \ xamarin.shared.sdk.targets(366,3): 错误: ExcregateException :发生一个或多个错误。 (方法 或未实施操作。)[C:\ developtim_buildPipeline \ ans iemobile \ onesiemobile \ onesiemobile.csproj]
c:\ program 文件\ dotnet \ packs \ microsoft.ios.sdk \ 15.4.303 \ targets \ xamarin.shared.sdk.targets(366,3): 错误: notimplemplededexception :方法或操作不是 实施的。 [c:\ development_buildPipeline \ onesiemobile \ onesiemobile \ ans iemobile.csproj]
c:\ program 文件\ dotnet \ packs \ microsoft.ios.sdk \ 15.4.303 \ targets \ xamarin.shared.sdk.targets(366,3): 错误:[c:\ develo pment_buildPipeline \ onesiemobile \ onesiemobile \ onesiemobile.csproj]
我能够成功地使用Demo .Net Maui应用程序,将iPhone的整个应用程序与Visual Studio 2022中的模板随附的Demo .NET Maui应用程序整个过程。
我也有能力。要克隆并发布此项目一直到我的iPhone。
所以我以为我开始从事自己的项目。
- 当我按“ Visual Studio”中的“播放”按钮并将其作为Windows应用程序在调试器中的Windows应用程序中运行时,它的功能也很棒,
- 它在云Mac的远程iOS模拟器上也可以通过我的机器上的Visual Studio运行。 (虽然需要15分钟的时间来启动它!)
环境:
Windows 10 Home,21H2
vs 2022版本17.3.0预览1.1
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.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>OnesieMobile</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Display name -->
<ApplicationTitle>OnesieMobile</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.maui.app</ApplicationId>
<ApplicationIdGuid>447A62C6-2841-41D6-B9AE-444E6E1A908B</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'">21.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)' == 'Release'">
<RuntimeIdentifiers>ios-arm64</RuntimeIdentifiers>
<CodesignProvision>Maui Provisioning</CodesignProvision>
<CodesignKey>Apple Distribution: My Name (XXXX)</CodesignKey>
<ArchiveOnBuild>true</ArchiveOnBuild>
<TcpPort>58181</TcpPort>
<ServerAddress>xxxxx</ServerAddress>
<ServerUser>xxxx</ServerUser>
<ServerPassword>xxxx</ServerPassword>
<_DotNetRootRemoteDirectory>/Users/xxxx/Library/Caches/Xamarin/XMA/SDKs/dotnet/</_DotNetRootRemoteDirectory>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<!-- Splash 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.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="7.1.2" />
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
</ItemGroup>
<ItemGroup>
<Compile Update="View\ActivityDetailPage.xaml.cs">
<DependentUpon>ActivityDetailPage.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<MauiXaml Update="View\ActivityDetailPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\SettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
</Project>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
弄清楚了。
我不得不更改
到
那时。
官方文档给出了单数版本 https:/ 。
dotnet publish
错误
error netsdk1032 PlatformTarget“ X64”必须兼容,这可能是复数形式工作的最初原因。在 *.csproj.user文件中,该值已将其设置为此
,并且由于某些原因,项目设置和命令行参数被 *.csproj.user文件否决,唯一会做某件事的属性是其中一个属性。复数形式。
不幸的是,在所有这些错误之后,我再也无法分辨出来,如果我实际上有一个版本可以使用复数设置发布。 相信我做到了
而
总结,删除.csproj.user并将.csproj设置为类似以下内容的功能。然后执行
。
Figured it out.
I had to change
to
then it worked.
The official documentation gives the singular version https://learn.microsoft.com/en-us/dotnet/maui/ios/deployment/overview
The reason why I had changed it, was because of this
Errors with dotnet publish
but then later I also went through this
error NETSDK1032: The RuntimeIdentifier platform 'ios-arm64' and the PlatformTarget 'x64' must be compatible, which was probably the original reason why the plural form worked. In the *.csproj.user file the value was set to this
and since for some reason the project settings and the command line arguments are overruled by the *.csproj.user file, the only property that would do something was the one in the plural form.
Unfortunately I can not tell anymore after all these errors, if I actually had a version that would publish with the plural settings. (I believe I did)
In short:
To summarize, deleting the .csproj.user and setting the .csproj to something like the following should work. And then execute
.
解释
尝试通过安装毛伊岛检查来检查毛伊岛环境。
毛伊岛检查是一种确定您的环境是否准备好毛伊岛开发的工具。虽然您可以专门使用DOT Net CLI安装MAUI,但该工具确保您拥有所有适当的工作负载,以构建目标环境等等。它还将安装毛伊岛应用程序的任何必要模板。
步骤1
打开您的命令提示符窗口。从您的终端登录以下命令:
步骤2
安装了MAUI检查后,请从终端运行以下命令:
过程将将以下依赖项安装到您的环境中:
OpenJDK - 用于构建Android,Android SDK和Emulator和.NET SDK工作负载(Android,MacOS,MacCatalyst,iOS和TVOS)
step 3
最后,在此步骤中,让我们再加上一个WASM工具的工作负载安装。您需要此工作量,因为毛伊岛支持在毛伊岛应用程序中托管大华。
从您的终端运行以下命令:
注意:
如果您已经安装了Xcode,OpenJDK和Android SDK的环境依赖性,则可以在终端中运行以下命令来安装必要的工作负载。从您的终端运行以下命令:
我希望这会有所帮助。
Explanation
Try checking your Maui environment by installing MAUI check.
MAUI Check is a tool that determines if your environment is ready for MAUI development. While you could go about installing MAUI using the dot net CLI exclusively, the tool makes sure you have all the appropriate workloads available to build towards a target environment and more. It will also install any necessary templates for MAUI apps.
STEP 1
Open your command prompt window.run the following command from your terminal:
STEP 2
Once you have MAUI Check installed, run the following command from your terminal:
The process will install the following dependencies into your environment:
OpenJDK – For building Android, Android SDK and Emulator and .NET SDK Workloads for MAUI (Android, macOS, MacCatalyst, iOS, and tvOS)
STEP 3
Finally, in this step, let’s end with one more workload install of WASM tools. You need this workload because MAUI supports hosting Blazor inside a MAUI app.
Run the following command from your terminal:
Note:
In case, you already have installed the environmental dependencies of Xcode, OpenJDK, and Android SDK yourself, you can run the following command in a terminal to install the necessary workloads. Run the following command from your terminal:
I hope this will help.