gpt4 book ai didi

c# - 如何在Raspberry PI上运行.net core 3.1应用程序?

转载 作者:行者123 更新时间:2023-12-01 23:54:54 34 4
gpt4 key购买 nike

我尝试过的:

  1. 在 VS 2019 中创建默认的空 asp.net core 项目,它面向 .Net Core 3.1
  2. 运行:dotnetpublish-cRelease-rlinux-arm--self-contained(也尝试过不使用--self-contained,两者都会产生完全相同的工件)
  3. bin\Release\netcoreapp3.1\linux-arm\publish的内容复制到Raspberry PI
  4. 下载并解压 ASP.NET Core Runtime 3.1.0 (Linux 二进制文件 ARM32)在我的 Raspberry PI 上
  5. 运行我的应用程序:dotnet WebApplication1.dll

我收到以下错误:

pi@raspberrypi:/usr/bin/testApp $ dotnet WebApplication1.dll
Error:
An assembly specified in the application dependencies manifest (WebApplication1.deps.json) was not found:
package: 'runtimepack.Microsoft.NETCore.App.Runtime.linux-arm', version: '3.1.0'
path: 'createdump'

我做错了什么?

最佳答案

我前段时间遇到了这个问题,一个对我有用的解决方案是将以下几行放入 .csproj

<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>

关于c# - 如何在Raspberry PI上运行.net core 3.1应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59227830/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com