Skip to content

Commit

Permalink
Add switch to disable apphost pack restore
Browse files Browse the repository at this point in the history
Contributes to dotnet/runtime#58109

In dotnet/runtime we live build targeting packs, runtime packs and app host packs. For the former two, switches already exist to disable nuget restore:
- EnableTargetingPackDownload
- EnableRuntimePackDownload

The latter one doesn't yet have such a switch and therefore is always restored by NuGet. In the cases where want to use the live built apphost pack, restore fails, i.e. from a runtime build:

`artifacts/bin/trimmingTests/projects/Microsoft.Extensions.DependencyInjection.TrimmingTests/ActivatorUtilitiesTests/osx-x64/project.csproj(0,0): error NU1102: (NETCORE_ENGINEERING_TELEMETRY=Build) Unable to find package Microsoft.NETCore.App.Host.osx-x64 with version (= 8.0.0)`
  • Loading branch information
ViktorHofer authored Nov 20, 2022
1 parent ac8b0e8 commit 61991b5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Copyright (c) .NET Foundation. All rights reserved.
DotNetIjwHostLibraryNameWithoutExtension="$(_DotNetIjwHostLibraryNameWithoutExtension)"
RuntimeGraphPath="$(BundledRuntimeIdentifierGraphFile)"
KnownAppHostPacks="@(KnownAppHostPack)"
NuGetRestoreSupported="$(_NuGetRestoreSupported)"
NuGetRestoreSupported="$([MSBuild]::ValueOrDefault('$(EnableAppHostPackDownload)', '$(_NuGetRestoreSupported)'))"
NetCoreTargetingPackRoot="$(NetCoreTargetingPackRoot)">

<Output TaskParameter="PackagesToDownload" ItemName="_PackageToDownload" />
Expand Down

0 comments on commit 61991b5

Please sign in to comment.