问题在 macOS 上运行 asp.net core 项目时发生。

huangapple go评论74阅读模式
英文:

Problem running aspnet core project on macos

问题

我想在 macOS 上运行一个 ASP.NET Core 后端 API,该项目在 Windows 机器上开发,因此使用了 IIs Express 来运行它,但我不知道需要做什么更改才能在 macOS 上运行它。

我发现 IIs Express 在 macOS 上不起作用,所以我需要使用一些替代方案,正如我所认为的那样。

英文:

I want to run a backend API in ASP.NET Core on a macos, the project was developed on Windows machines so there was used IIs Express to run it, but i don't know what I need to change to have it run on macos.

I found that IIs Express don't work on macos, so I need to use some alternative as I think

答案1

得分: 1

你可以参考这篇博客来运行你的应用程序。

如何构建跨平台的.NET Core应用程序

我尝试在Windows上创建一个应用程序,然后将它复制到macOS上。我可以在macOS上成功运行它,使用Visual Studio for Mac,还尝试了Rider。你也可以使用dotnet-cli来启动应用程序。

根据官方文档的建议,它建议使用Nginx

英文:

You can refer this blog to run your application.

How to Build Cross-Platform .NET Core Apps

I have tried to create a app in windows, then copy it to macos. I can run it successfully in macos by using visual studio mac, and also tried in Rider. You also can using the dotnet-cli to start the application.

According to the official doc, it suggests to using Nginx.

huangapple
  • 本文由 发表于 2023年2月6日 04:27:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/75355303.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定