Skip to content

Make TestAssets.sln buildable locally#15466

Merged
nohwnd merged 1 commit intomainfrom
dev/ygerges/buildable-testassets
Mar 9, 2026
Merged

Make TestAssets.sln buildable locally#15466
nohwnd merged 1 commit intomainfrom
dev/ygerges/buildable-testassets

Conversation

@Youssef1313
Copy link
Copy Markdown
Member

Description

  • Considers artifacts/packages/CONFIGURATION/Shipping as package source
  • Also considers $(Version)-dev which is the version generated in most local builds.
  • When actually running the integration tests, the version is set by
    ExecuteApplication2(Dotnet, $"""restore --packages {nugetCache} {nugetFeeds} --source "{IntegrationTestEnvironment.LocalPackageSource}" -p:PackageVersion={netTestSdkVersion} "{testAssets}" """);

Related issue

Kindly link any related issues. E.g. Fixes #xyz.

  • I have ensured that there is a previously discussed and approved issue.

Copilot AI review requested due to automatic review settings March 9, 2026 17:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the TestAssets.sln buildable locally by configuring the build to find locally built packages and use the appropriate version suffix for local builds.

Changes:

  • Adds the local artifacts shipping directory as a package restore source
  • Sets PackageVersion to $(Version)-dev to match the version format generated in local builds

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
test/TestAssets/Directory.Build.props Adds the local artifacts/packages directory as an additional NuGet restore source
test/TestAssets/Directory.Build.targets Sets PackageVersion to $(Version)-dev to align with locally built package versions

<!-- We don't want these projects to be Arcade projects, because they are
test projects for testing, and most people don't use Arcade, so we don't want the details of
arcade to go into them. -->
<PropertyGroup>
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

Setting PackageVersion unconditionally will override the version set by the integration test infrastructure (via Build.cs) when the tests are run in CI. This property should only be set when a local build is detected, for example by conditioning on whether the local packages directory exists or on a property that indicates a local build, similar to the condition used in Directory.Build.props for RestoreAdditionalProjectSources. Without a condition, CI builds may end up using the wrong package version.

Suggested change
<PropertyGroup>
<PropertyGroup Condition="'$(IsLocalBuild)' == 'true'">

Copilot uses AI. Check for mistakes.
@nohwnd nohwnd enabled auto-merge (squash) March 9, 2026 19:33
@nohwnd nohwnd merged commit 49d06a2 into main Mar 9, 2026
7 checks passed
@nohwnd nohwnd deleted the dev/ygerges/buildable-testassets branch March 9, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants