Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes for recent work in VSIX up-to-date checks and path detection #14868

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
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
5 changes: 5 additions & 0 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,11 @@ function GetNuGetPackageCachePath() {
# global packages folder, this expression will evaluate to the empty string which will effectively leave the
# environment variable set to null.
$env:NUGET_PACKAGES = $nugetConfigXml.SelectSingleNode("//configuration/config/add[@key='globalPackagesFolder']").value
if ($env:NUGET_PACKAGES -ne $null) {
# Join-Path with an empty child path effectively adds a trailing directory separator only if one does not
# already exist
$env:NUGET_PACKAGES = Join-Path $env:NUGET_PACKAGES ''
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 This makes me a bit uncomfortable; let me know if it's acceptable or if there is a better way to do it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$env:NUGET_PACKAGES = Join-Path $env:NUGET_PACKAGES ''
$env:NUGET_PACKAGES = Join-Path $env:NUGET_PACKAGES $([IO.Path]::DirectorySeparatorChar)

This appears to do the correct thing locally.

}
}

if ($env:NUGET_PACKAGES -eq $null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
<!--
Make sure to include information about inputs and outputs to CreateVsixContainer for fast up-to-date check.
-->
<PropertyGroup>
<PropertyGroup Condition="'$(VSToolsPath)' != '' and ('$(IsVsixProject)' == 'true' or '$(GeneratePkgDefFile)' == 'true')">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 This is the same condition used above for conditional import of VisualStudio.ImportSdk.targets

<CollectUpToDateCheckInputDesignTimeDependsOn>$(CollectUpToDateCheckInputDesignTimeDependsOn);CollectVsixUpToDateCheckInput</CollectUpToDateCheckInputDesignTimeDependsOn>
<CollectUpToDateCheckBuiltDesignTimeDependsOn>$(CollectUpToDateCheckBuiltDesignTimeDependsOn);CollectVsixUpToDateCheckBuilt</CollectUpToDateCheckBuiltDesignTimeDependsOn>
</PropertyGroup>
Expand Down
Loading