【发布时间】:2018-06-02 11:49:20
【问题描述】:
我想在 linux 上使用 .Net Core 并且有最新版本:
> sudo pacman -Qs dotnet
local/dotnet-host 2.1.0-1
A generic driver for the .NET Core Command Line Interface
local/dotnet-runtime 2.1.0-1
The .NET Core runtime
local/dotnet-sdk 2.1.300-1
The .NET Core SDK
> dotnet --version
2.1.300
但是当我想运行我的示例应用程序(只是 razor 模板)时:
> dotnet run
Using launch settings from /home/user/src/WebRepTrack/Properties/launchSettings.json...
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.
- Check application dependencies and target a framework version installed at:
/opt/dotnet/
- Installing .NET Core prerequisites might help resolve this problem:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
查看this issue,问题是用户没有安装适当的sdk/runtime 版本,但这不是我的问题的原因,不是吗?
编辑:在查看 github 上的 dotnet-core 存储库后,我意识到 MS 现在随包 aspnetcore-runtime-2.1.0 提供了 asp.net 核心支持(而之前,它是随 core-runtime 一起提供的)。 ArchLinux 软件包dotnet-runtime 不包含此更改!更多详情请看这里:
https://bugs.archlinux.org/task/58806
【问题讨论】:
-
如果您删除
launchSettings.json文件,这有帮助吗? (目前只是猜测。) -
不幸的是,它根本没有帮助。但是感谢您的帮助!
标签: c# asp.net-core .net-core archlinux