简体   繁体   English

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

[英]How build httpstatus on linux by dotnet core 3?

httpstatus is Easily generate different HTTP responses for testing httpstatus 很容易生成不同的 HTTP 响应进行测试

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

dotnet --version
3.0.100

Cd src in repo httpstatus回购 httpstatus 中的 cd src

ls
Teapot.sln  Teapot.Web
Build:

dotnet build点网构建

/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)

The error message indicates that this is not an ASP.NET Core web project, and cannot be built on this platform (Linux?).错误信息表明这不是 ASP.NET Core web 项目,不能在这个平台上构建(Linux?)。 To build such project, you would need a Windows box, and two things:要构建这样的项目,您需要一个 Windows 盒子和两件事:

  • MSBuild (this is incorporated in the dotnet installation as well) MSBuild(这也包含在 dotnet 安装中)
  • the corresponding SDK - in your case, the workload for building web projects.相应的 SDK - 在您的情况下,构建 web 项目的 工作量

You can install this workload, named " ASP.NET and web development ", using Visual Studio or Build Tools for Visual Studio installers.您可以使用Visual StudioBuild Tools for Visual Studio安装程序安装此工作负载,名为“ ASP.NET and web development ”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM