Skip to content

Conversation

@NikolaMilosavljevic
Copy link
Member

Fixes: dotnet/source-build#5359

Fixing this by setting the CustomPreviouslySourceBuiltPackagesPath property in both test and non-test scenarios.

The failure was due to

<!-- Unpacks the Private.SourceBuilt.Artifacts archive -->
<Target Name="UnpackSourceBuiltArtifactsArchive"
Condition="'$(CustomPreviouslySourceBuiltPackagesPath)' == ''"

We were only setting CustomPreviouslySourceBuiltPackagesPath for non-test runs. For tests we were setting a different property:

dotnet/build.sh

Lines 412 to 419 in 0a70a71

# Support custom source built package locations
if [ "$customPackagesDir" != "" ]; then
if [ "$test" == "true" ]; then
properties+=( "/p:CustomSourceBuiltPackagesPath=$customPackagesDir" )
else
properties+=( "/p:CustomPreviouslySourceBuiltPackagesPath=$customPackagesDir" )
fi
fi

However, CustomSourceBuiltPackagesPath isn't used anywhere.

We do have a custom property with a similar name, that is used for tests to provide custom packages feed. I don't think we should set that property automatically - it doesn't seem that was the original intent -

Some prerelease scenarios, usually security updates, require non-source-built packages which are not publicly available.
You can specify a custom nuget feed for where these packages can be loaded from via the `SourceBuildTestsCustomSourceBuiltPackagesPath`
msbuild property when running tests via `build.sh ---test` e.g. `/p:SourceBuildTestsCustomSourceBuiltPackagesPath=<FEED URL OR LOCAL PATH>`.

@NikolaMilosavljevic NikolaMilosavljevic requested review from a team as code owners October 13, 2025 18:40
@NikolaMilosavljevic NikolaMilosavljevic changed the title Custom packages path for test scenario [infra change] Custom packages path for test scenario Oct 13, 2025
@NikolaMilosavljevic NikolaMilosavljevic changed the title [infra change] Custom packages path for test scenario [infra] Custom packages path for test scenario Oct 13, 2025
@NikolaMilosavljevic NikolaMilosavljevic merged commit 81a0819 into dotnet:release/10.0.1xx Oct 13, 2025
10 checks passed
@NikolaMilosavljevic
Copy link
Member Author

/backport to main

@github-actions
Copy link
Contributor

@tmds
Copy link
Member

tmds commented Oct 14, 2025

Thank you, @NikolaMilosavljevic!

@mthalman
Copy link
Member

/backport to release/10.0.2xx

@github-actions
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants