Condition="'$(Configuration)|$(Platform)'=='Release|x86'">Properties\PublishProfiles\SelfContainedWin86.pubxml Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Properties\PublishProfiles\SelfContainedWin64.pubxml Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">Properties\PublishProfiles\SelfContainedWin86Debug.pubxml Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Properties\PublishProfiles\SelfContainedWin64Debug.pubxml
还可通过引用 .pubxml 文件(自 .NET Core 3.1 SDK 起可用)设置与发布相关的属性。 PublishProfile=FolderProfile 前面的示例使用 <project_folder>/Properties/PublishProfiles 文件夹中的 FolderProfile.pubxml 默认情况下,MSBuild 会在 Properties/PublishProfiles 文件夹中查找,并假定 .pubxml 文件扩展名。 有关更多信息,请参见以下资源: MSBuild 命令行参考 用于 ASP.NET Core 应用部署的 Visual Studio 发布配置文件 (.pubxml) dotnet msbuild 工作负载清单下载
Rebuild /P:Configuration=Release /p:VisualStudioVersion=14.0 /p:DeployOnBuild=True;PublishProfile=Test.pubxml VisualStudioVersion=14.0 指定子工具集(VS2015为14.0,2017为15.0),不设置会报错 /p:DeployOnBuild=True;PublishProfile=Test.pubxml 使用 Test.pubxml 发布文件来发布项目 .pubxml文件可在VS发布时配置,位于Properties文件夹内。 五、通过Ftp发布至应用服务器 构建成功后,Test.pubxml会指定发布的包的路径(最好是放到工作空间下),按照思路,接下来就是要想办法把发布包Copy到应用服务器的根目录下。
deploy settings # but database connection strings (with potential passwords) will be unencrypted *.pubxml
对于需要发布的 Web 项目需要定义 Web 发布属性,自动化构建中,依赖这些提前配置的属性,这些属性会生成一个 .pubxml 文件,随源代码一起上传到仓库。 保存设置后,在项目的 Properties\PublishProfiles 目录,可以找到 FolderProfile.pubxml 文件,其中有一行 PublishUrl 属性,为网站发布时的输出目录
Eg: jenkins_profile.pubxml、项目配置文件等 ------------test-publish-template-app-config.json 项目映射配置表 ------
Microsoft Build Engine 是MSBuild的全称,是一个独立的存在生成平台,不需要依赖vs,但是vs的生成、发布等等功能都是基于MSBuild去构建的,它能读取.sln、.csproj、.pubxml
deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml
deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml
web deploy settings,# but database connection strings (with potential passwords) will be unencrypted*.pubxml
)) < 8">win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers> <PublishProfile>win-$(Platform).pubxml
这里也需要额外说明的是,尽管本文内容都在 Windows 下测试,但事实上本文介绍的 dotnet 这项新功能是可以在全平台使用的,即在 Linux 或 mac 上也适用 我的发布配置文件 FolderProfile.pubxml
这里也需要额外说明的是,尽管本文内容都在 Windows 下测试,但事实上本文介绍的 dotnet 这项新功能是可以在全平台使用的,即在 Linux 或 mac 上也适用 我的发布配置文件 FolderProfile.pubxml
deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml
deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml