Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经使用 .Net Core Blazor App 构建了一个小型应用程序,现在我正尝试在 Ubuntu 服务器上发布它。可悲的是,我找不到关于这个问题的任何具体帖子或指南。
为了构建 Blazor 应用程序,您可以从包含应用程序的 .csproj 的目录中执行以下操作:
dotnet publish -c Release
该命令将在您的项目文件夹中创建一组文件。目录名称可能略有不同,具体取决于您使用的 dotnet 版本。
bin/Release/netstandard2.0/publish/project-name/dist/
然后,您可以将 dist 文件夹的内容复制到您的服务器上可供网络服务器访问的位置。加载 index.html 后,您的 Blazor 应用程序将执行。
可以在此链接中找到有关构建发布的更多信息。