在 Visual Studio 2019 for Windows 中使用 .NET Core 应用程序时,我可以选择将应用程序发布为 Windows、Linux 或 Mac 包、依赖于框架或自包含。我一定遗漏了一些明显的东西,但是我如何在 Visual Studio for Mac 中做同样的事情呢?它只是发布内容而不要求任何选项。
我尝试手动编辑发布配置文件以包含最后两行:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>AnyCPU</LastUsedPlatform>
<publishUrl>../../dist</publishUrl>
<ExcludeAppData>False</ExcludeAppData>
<DeleteExistingFiles>true</DeleteExistingFiles>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeIdentifier>linux-64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
</PropertyGroup>
</Project>
但它们似乎没有效果。