Migrates unit tests to use RoslynCodeTaskFactory to enable running tests under .NET Core#13500
Conversation
…sts under .NET Core
There was a problem hiding this comment.
Pull request overview
This PR migrates a first batch of unit tests away from CodeTaskFactory to RoslynCodeTaskFactory to enable running the tests under .NET Core, aligning with the repo direction described in #248.
Changes:
- Updated several inline-task-based test projects to use
RoslynCodeTaskFactoryinstead ofCodeTaskFactory. - Removed
FEATURE_CODETASKFACTORYcompilation guards around the updated tests so they run in more configurations. - Deleted a couple of previously skipped legacy inline-task tests (that relied on older task assemblies / behavior).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Build.UnitTests/BackEnd/TaskHost_Tests.cs |
Switches inline tasks in “log after task is done” tests to RoslynCodeTaskFactory and modernizes the embedded project XML. |
src/Build.UnitTests/BackEnd/TaskBuilder_Tests.cs |
Updates the null-metadata inline-task test to RoslynCodeTaskFactory, adjusts test naming/comment text, and removes skipped legacy inline-task tests. |
@dotnet-policy-service agree company="Microsoft" |
Fixes #248
Context
I'm trying to migrate the tests so we can run them on .NET Core as indicated in the task.
Doing a small first batch first to catch any concerns and understand repo mechanics, will do a bigger volume in a follow-up PR.
Changes Made
Testing
Tests should be passing for both Framework and Core flavors.
Notes