Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Enable setting custom folder name for build & publish
Setting custom build and publish folder names is now enabled via 'BuildDirName' and 'PublishDirName'.
The defaults are 'build' for build directory and 'publish' for publish directory.
  • Loading branch information
Nirmal4G committed Nov 5, 2021
commit 3cc87c64301368c16b0061d1dfbacdb6390b83dc
3 changes: 2 additions & 1 deletion src/Tasks/Microsoft.Common.CurrentVersion.targets
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ Copyright (C) Microsoft Corporation. All rights reserved.

<!-- Output location for publish target. -->
<PropertyGroup>
<PublishDir>$([MSBuild]::EnsureTrailingSlash($([MSBuild]::ValueOrDefault('$(PublishDir)', 'publish'))))</PublishDir>
<PublishDirName Condition="'$(PublishDirName)' == ''">publish</PublishDirName>
<PublishDir>$([MSBuild]::EnsureTrailingSlash($([MSBuild]::ValueOrDefault('$(PublishDir)', '$(PublishDirName)'))))</PublishDir>
<PublishDir Condition="$([System.IO.Path]::IsPathRooted('$(PublishDir)')) and !$(PublishDir.StartsWith('$(MSBuildProjectDirectory)'))">$([MSBuild]::NormalizeDirectory('$(PublishDir)', '$(MSBuildProjectName)'))</PublishDir>
</PropertyGroup>

Expand Down
3 changes: 2 additions & 1 deletion src/Tasks/Microsoft.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Copyright (C) Microsoft Corporation. All rights reserved.
and across multiple projects. Also for the $(MSBuildProjectExtensionsPath) to use it as a common root.
-->
<PropertyGroup>
<BuildDir>$([MSBuild]::EnsureTrailingSlash($([MSBuild]::ValueOrDefault('$(BuildDir)', 'build'))))</BuildDir>
<BuildDirName Condition="'$(BuildDirName)' == ''">build</BuildDirName>
<BuildDir>$([MSBuild]::EnsureTrailingSlash($([MSBuild]::ValueOrDefault('$(BuildDir)', '$(BuildDirName)'))))</BuildDir>
<BuildDir Condition="$([System.IO.Path]::IsPathRooted('$(BuildDir)')) and !$(BuildDir.StartsWith('$(MSBuildProjectDirectory)'))">$([MSBuild]::NormalizeDirectory('$(BuildDir)', '$(MSBuildProjectName)'))</BuildDir>
<_InitialBuildDir>$(BuildDir)</_InitialBuildDir>
</PropertyGroup>
Expand Down