dotnet / dotnet/aspnetcore

Re-write `.nuspec` files before running tests

Open
#56,706 0 comments 0 reactions 0 assignees View on GitHub
area-infrastructure task
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

## Problem

We currently have a [task](https://github.com/dotnet/aspnetcore/blob/c52c28458e86029555bf1a88e94b64e7f37ef6d3/eng/tools/RepoTasks/RemoveSharedFrameworkDependencies.cs) as part of our build pipeline that re-writes the `.nuspec`s of locally produced packages to remove dependencies that get included in the shared framework. This runs as the last step end of the build, after tests have completed.

We also have Blazor Playwright tests that generate projects from the Blazor Web project templates and run them against the locally built shared framework. Since these tests run _before_ the `.nuspec` re-write, the templates fail to restore because some transient dependencies of packages they reference don't exist (they're included in the shared framework).

## Proposal

We should consider changing the `.nuspec` re-write to occur before tests are run so that generated projects can reference locally built packages which depend on the locally built shared framework.

## What this enables

The Playwright template tests are currently still able to run in Helix, because local artifacts are already produced and laid out correctly by the time the tests run. However, this fix would enable non-Helix pipelines to run the template tests (like the Windows Server x64 pipeline).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.