Conversation
There was a problem hiding this comment.
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
PackageVersionto$(Version)-devto 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> |
There was a problem hiding this comment.
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.
| <PropertyGroup> | |
| <PropertyGroup Condition="'$(IsLocalBuild)' == 'true'"> |
Description
$(Version)-devwhich is the version generated in most local builds.vstest/test/Microsoft.TestPlatform.Acceptance.IntegrationTests/Build.cs
Line 62 in 3ae44f0
Related issue
Kindly link any related issues. E.g. Fixes #xyz.