NBe*_*ers 5 deployment .net-core
我创建了一个 .NET CORE 应用程序,当使用 Visual Studio 时,我能够创建发布配置文件并在使用 Visual Studio 时成功部署它。当我尝试通过命令行使用文档推荐的方法时,它不使用指定的发布配置文件,而只是构建默认的调试版本并将其放入 bin/debug 文件夹中。这是我的发布简介:
发布配置文件.pubxml
<Project ToolsVersion="4.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<ProjectGuid>5a906ff1-d02c-41f7-8912-445f66e15bff</ProjectGuid>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>
<publishUrl>bin\Release\netcoreapp2.0\publish\win10-x64</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>
Run Code Online (Sandbox Code Playgroud)
我运行命令dotnet publish App.API.csproj /p:PublishProfile=ReleaseProfile
难道我做错了什么?因为看来我应该能够引用我在 Visual Studio 中使用的发布配置文件,以通过命令行运行相同的发布操作。
小智 0
/p 标志dotnet publish似乎不存在/没有记录。
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish?tabs=netcore21
| 归档时间: |
|
| 查看次数: |
2696 次 |
| 最近记录: |