From 06a048fbd0ac1cc07f3d448f5fce4c2a5beac160 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Wed, 19 Jun 2024 11:22:33 -0500 Subject: [PATCH 1/4] Only hook up VSIX up-to-date check when VSToolsPath is defined In other cases, the VSIX container properties are not defined, leading to failures in early design time build scenarios. --- .../tools/VisualStudio.VsixBuild.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.VsixBuild.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.VsixBuild.targets index 6b3368611fc..cf30c8b3395 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.VsixBuild.targets +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/VisualStudio.VsixBuild.targets @@ -284,7 +284,7 @@ - + $(CollectUpToDateCheckInputDesignTimeDependsOn);CollectVsixUpToDateCheckInput $(CollectUpToDateCheckBuiltDesignTimeDependsOn);CollectVsixUpToDateCheckBuilt From 12b698c4db6978d504c8256332a5c4bd19551b4e Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Wed, 19 Jun 2024 11:30:25 -0500 Subject: [PATCH 2/4] Ensure globalPackagesFolder has a trailing directory separator --- eng/common/tools.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 19e09f37f83..e5fae740084 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -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 '' + } } if ($env:NUGET_PACKAGES -eq $null) { From 75fcbf6d06cd77431fd7ced9e7ff0eeaabbd0624 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Wed, 19 Jun 2024 14:13:16 -0500 Subject: [PATCH 3/4] Fix failure to restore packages needed for Sign.proj --- .../tools/Build.proj | 35 +++++++++---- .../tools/Sign.proj | 51 +++++++++++++++++++ 2 files changed, 76 insertions(+), 10 deletions(-) diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj index 11bc975dd42..f435ce5be47 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj @@ -134,19 +134,18 @@ - <_RestoreToolsProps Include="@(_CommonProps)"/> - <_RestoreToolsProps Include="BaseIntermediateOutputPath=$(ArtifactsToolsetDir)Common"/> - <_RestoreToolsProps Include="ExcludeRestorePackageImports=true"/> - <_RestoreToolsProps Include="_NuGetRestoreTargets=$(_NuGetRestoreTargets)"/> - + <_RestoreProps Include="@(_CommonProps)"/> + <_RestoreProps Include="ExcludeRestorePackageImports=true"/> + <_RestoreProps Include="_NuGetRestoreTargets=$(_NuGetRestoreTargets)"/> + - <_RestoreToolsProps Include="Publish=$(Publish)"/> + <_RestoreProps Include="Publish=$(Publish)"/> - <_RestoreToolsProps Include="PublishToSymbolServer=$(PublishToSymbolServer)"/> + <_RestoreProps Include="PublishToSymbolServer=$(PublishToSymbolServer)"/> - <_RestoreToolsProps Include="DotNetPublishUsingPipelines=$(DotNetPublishUsingPipelines)"/> + <_RestoreProps Include="DotNetPublishUsingPipelines=$(DotNetPublishUsingPipelines)"/> - <_RestoreToolsProps Include="DotNetRuntimeSourceFeed=$(DotNetRuntimeSourceFeed)"/> - <_RestoreToolsProps Include="DotNetRuntimeSourceFeedKey=$(DotNetRuntimeSourceFeedKey)"/> + <_RestoreProps Include="DotNetRuntimeSourceFeed=$(DotNetRuntimeSourceFeed)"/> + <_RestoreProps Include="DotNetRuntimeSourceFeedKey=$(DotNetRuntimeSourceFeedKey)"/> + + + + <_RestoreToolsProps Include="@(_RestoreProps)"/> + <_RestoreToolsProps Include="BaseIntermediateOutputPath=$(ArtifactsToolsetDir)Common"/> + + <_RestoreSignProps Include="@(_RestoreProps)"/> + <_RestoreSignProps Include="BaseIntermediateOutputPath=$(ArtifactsToolsetDir)CommonSign"/> @@ -185,6 +192,14 @@ Properties="@(_RestoreToolsProps);_NETCORE_ENGINEERING_TELEMETRY=Restore" Condition="'$(Restore)' == 'true'"/> + + + + + net472 + + 5 + .NETFramework + .NETFramework,Version=v4.7.2 + $(BaseIntermediateOutputPath) + + + + + $(RepoRoot)NuGet.config + $(RepoRoot)NuGet.Config + $(RepoRoot)nuget.config + + + + + + + + <_ImportOrUseTooling>false + <_ImportOrUseTooling Condition="('$(ArcadeInnerBuildFromSource)' != 'true' and '$(DotNetBuildFromSourceFlavor)' != 'Product') and + ('$(DotNetBuildSourceOnly)' != 'true' or ('$(DotNetBuildPhase)' == 'Repo' and '$(DotNetBuildOrchestrator)' != 'true'))">true + + + + + + + + + + + + From 2455fde17932055e36af49713be94b7cecfdbe76 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Wed, 19 Jun 2024 16:23:34 -0500 Subject: [PATCH 4/4] Fix failure to restore packages needed for Publish.proj --- .../tools/Build.proj | 11 +++++ .../tools/Publish.proj | 46 +++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj index f435ce5be47..2f6e03b9b32 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj @@ -163,6 +163,9 @@ <_RestoreSignProps Include="@(_RestoreProps)"/> <_RestoreSignProps Include="BaseIntermediateOutputPath=$(ArtifactsToolsetDir)CommonSign"/> + + <_RestorePublishProps Include="@(_RestoreProps)"/> + <_RestorePublishProps Include="BaseIntermediateOutputPath=$(ArtifactsToolsetDir)CommonPublish"/> @@ -200,6 +203,14 @@ Properties="@(_RestoreSignProps);_NETCORE_ENGINEERING_TELEMETRY=Restore" Condition="'$(Restore)' == 'true'"/> + + + + + net472 + + 5 + .NETFramework + .NETFramework,Version=v4.7.2 + $(BaseIntermediateOutputPath) + + + + + $(RepoRoot)NuGet.config + $(RepoRoot)NuGet.Config + $(RepoRoot)nuget.config + + + + + + + + <_ImportOrUseTooling>false + <_ImportOrUseTooling Condition="('$(ArcadeInnerBuildFromSource)' != 'true' and '$(DotNetBuildFromSourceFlavor)' != 'Product') and + ('$(DotNetBuildSourceOnly)' != 'true' or ('$(DotNetBuildPhase)' == 'Repo' and '$(DotNetBuildOrchestrator)' != 'true'))">true + + + + + + +