如何通过dotnet core 3在Linux上构建httpstatus?

问题描述 投票:-1回答:1

httpstatus轻松生成不同的HTTP响应进行测试

存储库https://github.com/Readify/httpstatus

dotnet --version
3.0.100

回购httpstatus中的CD src

ls
Teapot.sln  Teapot.Web
Build:

dotnet构建

/root/httpstatus/src/Teapot.Web/Teapot.Web.csproj(145,3): error MSB4019: The imported project "/usr/share/dotnet/sdk/3.0.100/Microsoft/VisualStudio/v16.0/WebApplications/Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Build FAILED.

/root/httpstatus/src/Teapot.Web/Teapot.Web.csproj(145,3): error MSB4019: The imported project "/usr/share/dotnet/sdk/3.0.100/Microsoft/VisualStudio/v16.0/WebApplications/Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
    0 Warning(s)
    1 Error(s)
c# .net
1个回答
0
投票
错误消息表明这不是ASP.NET Core Web项目,因此不能在此平台上构建(Linux?)。要构建这样的项目,您需要一个Windows框,以及两件事:

    MSBuild(也集成在dotnet安装中)
  • 相应的SDK-在您的情况下,是用于构建Web项目的workload
  • 您可以使用Visual StudioBuild Tools for Visual Studio安装程序安装名为“

    ASP.NET和Web开发的工作负载。

  • © www.soinside.com 2019 - 2024. All rights reserved.