You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the SDK provides a hook to disable downloading the targeting pack: EnableTargetingPackDownload, however if a RuntimeIdentifier is set it attempts to download a runtime pack even if that property is set to false.
This has caused trouble in dotnet/runtime where we build a targeting/runtime pack (as a directory not nupkg) and then we override the PackageDirectory to point to the corresponding directory, so we never need to download either the targeting or runtime pack. However, now that we already moved our target framework to use net6.0 we had to add a KnownTargetFramework for net6.0 and we set the RuntimeFrameworkVersion to 6.0.0, since that runtime package doesn't exist in any of the feeds, we hit errors like:
/Users/santifdezm/repos/runtime/src/libraries/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj : error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.browser-wasm with version (= 6.0.0)
/Users/santifdezm/repos/runtime/src/libraries/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj : error NU1102: - Found 437 version(s) in dotnet5 [ Nearest version: 6.0.0-alpha.1.20420.3 ]
/Users/santifdezm/repos/runtime/src/libraries/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj : error NU1102: - Found 396 version(s) in dotnet6 [ Nearest version: 6.0.0-alpha.1.20610.6 ]
/Users/santifdezm/repos/runtime/src/libraries/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj : error NU1102: - Found 8 version(s) in nuget.org [ Nearest version: 5.0.1 ]
/Users/santifdezm/repos/runtime/src/libraries/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj : error NU1102: - Found 0 version(s) in dotnet-eng
/Users/santifdezm/repos/runtime/src/libraries/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj : error NU1102: - Found 0 version(s) in dotnet-tools
/Users/santifdezm/repos/runtime/src/libraries/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj : error NU1102: - Found 0 version(s) in dotnet5-transport
/Users/santifdezm/repos/runtime/src/libraries/Microsoft.CSharp/tests/Microsoft.CSharp.Tests.csproj : error NU1102: - Found 0 version(s) in dotnet6-transport
So we have had to add a workaround in a couple of places already to remove the package download with something like:
@safern I assume just disabling the download isn't enough as work would need to be done to pick up the runtime from the local build. We can put it in our backlog for 6.0 but don't know when we'll get to it but if ya'll want to contribute a PR, we'd be happy to take alook.
Right, in addition to disable the downloading of the runtime packs, we hook up the locally built runtime pack. I'm willing to send a PR, the change should be trivial.
Currently the SDK provides a hook to disable downloading the targeting pack:
EnableTargetingPackDownload
, however if aRuntimeIdentifier
is set it attempts to download a runtime pack even if that property is set to false.This has caused trouble in dotnet/runtime where we build a targeting/runtime pack (as a directory not nupkg) and then we override the
PackageDirectory
to point to the corresponding directory, so we never need to download either the targeting or runtime pack. However, now that we already moved our target framework to usenet6.0
we had to add aKnownTargetFramework
fornet6.0
and we set theRuntimeFrameworkVersion
to6.0.0
, since that runtime package doesn't exist in any of the feeds, we hit errors like:So we have had to add a workaround in a couple of places already to remove the package download with something like:
It would be great if we could just set something like
EnableRuntimePackDownload=false
and this is skipped:sdk/src/Tasks/Microsoft.NET.Build.Tasks/ProcessFrameworkReferences.cs
Lines 294 to 309 in 8ed60c6
cc: @dsplaisted @ViktorHofer @ericstj @Anipik
The text was updated successfully, but these errors were encountered: