Skip to content

Commit

Permalink
Revert + adjust "Ensure slash in PublishDir" (dotnet#11401)
Browse files Browse the repository at this point in the history
### Context
dotnet#11248 broke ClickOnce publishing -
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2359773
The breakage is caused by the 'NormalizePath' part - as it can change
relative path to absolute.

### Changes made
- reverted
- added the original change, which just ensures the slash
  • Loading branch information
JanKrivanek authored Feb 7, 2025
2 parents 7b604c2 + 343ff19 commit ae4b892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tasks/Microsoft.Common.CurrentVersion.targets
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
<!-- Output location for publish target. -->
<PropertyGroup>
<PublishDir Condition="'$(PublishDir)' != '' and !HasTrailingSlash('$(PublishDir)')">$(PublishDir)\</PublishDir>
<PublishDir Condition="'$(PublishDir)'==''">$([MSBuild]::EnsureTrailingSlash($([MSBuild]::NormalizePath('$(OutputPath)', 'app.publish'))))</PublishDir>
<PublishDir Condition="'$(PublishDir)'==''">$([MSBuild]::EnsureTrailingSlash('$(OutputPath)'))app.publish\</PublishDir>
</PropertyGroup>

<!--
Expand Down

0 comments on commit ae4b892

Please sign in to comment.