【发布时间】:2020-02-13 20:52:22
【问题描述】:
有没有办法同时启动 2 个网络应用项目?像这样的:
public class Program {
public static void Main(string[] args) {
BlazorApp.Program.Main(null);
MyWebApi.Program.Main(null);
// ... maybe start other services...
}
}
【问题讨论】:
-
在 Visual Studio 中,您可以通过在 Solution Explorer 中右键单击解决方案并选择 Properties 来设置多个启动项目。参考here;在 CLI 中,dotnet run 不会为您提供此功能,因为它在项目的上下文中工作并且您有两个单独的项目。您可以尝试编写一个 powershell 脚本来为您启动这两个应用程序。有关详细信息,请参阅intstrings.com/ramivemula/articles/…。
标签: asp.net-core c#-3.0 blazor kestrel-http-server blazor-client-side