Dotnet Maui Blazor应用程序构建使用Razor类图书馆(Android/ios)

发布于 2025-02-11 20:12:08 字数 770 浏览 4 评论 0原文

根据指南线配置的证书。我们能够在没有剃须刀库的情况下生成构建。当我们尝试使用Razor类生成构建时,会在低于错误的情况下进行构建。

dotnet\sdk\6.0.400-preview.22301.10\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResoluti
on.targets(267,5): error NETSDK1005: Assets file '\Razo
rClassLibrary\obj\project.assets.json' doesn't have a target for 'net6.0-android'. Ensure that restore has run and that
 you have included 'net6.0-android' in the TargetFrameworks for your project. [C:/RazorClassLibrary\RazorClassLibrary.csproj]

使用以下选项

  1. 删除的OBJ文件夹
  2. 还原Nuget软件包
  3. Visual Studio更新
  4. MSBUILD UPDATE
  5. 添加了&lttimeTimeIdentifier> android-arm64</runtime timeIdentifier>

花费两天以上,真正欣赏超过两天,真的很高兴解决此问题的指南。

Certificate configured as per the guide-line. We are able to generate build without razor class library. When we try to generate build with razor class getting below error.

dotnet\sdk\6.0.400-preview.22301.10\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResoluti
on.targets(267,5): error NETSDK1005: Assets file '\Razo
rClassLibrary\obj\project.assets.json' doesn't have a target for 'net6.0-android'. Ensure that restore has run and that
 you have included 'net6.0-android' in the TargetFrameworks for your project. [C:/RazorClassLibrary\RazorClassLibrary.csproj]

Tried with below options

  1. Removed obj folder
  2. Restore Nuget Package
  3. Visual Studio update
  4. MSBuild update
  5. Added <RuntimeIdentifier>android-arm64</RuntimeIdentifier>

Spending more than two days, Really appreciate any guide to resolve this issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

输什么也不输骨气 2025-02-18 20:12:08

我建议您

  1. 在图书馆项目中尝试此操作.csproj替换为复数 - &gt; &lt; targetFrameWorks&gt; net6.0; net6.0 android&lt;/targetFrameWorks&gt; gt;
  2. 在App Project .CSPROJ中,我将Android设置为API21,就API31而言,我的情况不起作用。
  3. 在应用程序项目中,右键单击,属性,转到Android / options / poffage符号,然后从密钥库中完成完整的信息

I suggest you try this

  1. In Library project .csproj replace TargetFramework by plural -> <TargetFrameworks>net6.0;net6.0-android</TargetFrameworks>
  2. In App project .csproj, I set android to API21, in my case with API31 didn't work.
  3. In App project, right click, properties, Go to Android / Options / Package Sign, and complete complete info from keystore
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文