.NET核心3.1 Visual Studio 2019
我已经创建了一个iOS Xamarin移动应用程序,使用在Windows上运行的Visual Studio。一切运行正常,甚至在我网络上连接到Mac的iPhone上调试也是如此。
我现在需要一个非常简单的控制台应用程序的实际Mac (macOS电脑)。我已经编写了Windows版本的控制台应用程序。
我不知道如何编译macOS的控制台应用程序。有可能吗?感谢您的帮助。
发布于 2020-03-03 23:10:48
如果它不使用Xamarin.Mac
app,那么您可以使用控制台应用程序组装并通过dotnet
运行它
或通过dotnet
将其作为self-contained executable
进行publish
dotnet publish --runtime osx.10.11-x64
或者是一个runtime-dependent cross-platform binary
dotnet publish
回复:https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish
但是如果你的应用使用的是Xamarin.Mac
app,那么在这里查看我的回答:
https://stackoverflow.com/questions/60516736
复制