Skip to content

Conversation

@tarunramsinghani
Copy link
Contributor

  • Add System.Threading.Tasks.Dataflow package reference to fix NU1605 package downgrade error for .NET 8 builds
  • Add DOTNET_ROOT export to ensure tests use local SDK runtime (10.0.1) instead of global
  • Add target framework validation to catch invalid values like '.net8.0' early with helpful error message

Context

Explain the context or motivation behind this PR. Include links to any related Azure DevOps Work Items or GitHub issues.
📌 How to link to ADO Work Items


Description

Provide a concise summary of the changes introduced in this PR.


Risk Assessment (Low / Medium / High)

Assess the risk level and justify your assessment. For example: code path sensitivity, usage scope, or backward compatibility concerns.


Unit Tests Added or Updated (Yes / No)

Indicate whether unit tests were added or modified to reflect the changes.


Additional Testing Performed

List manual or automated tests performed beyond unit tests (e.g., integration, scenario, regression).


Change Behind Feature Flag (Yes / No)

Can this change be behine feature flag, if not why?


Tech Design / Approach

  • Design has been written and reviewed.
  • Any architectural decisions, trade-offs, and alternatives are captured.

Documentation Changes Required (Yes/No)

Indicate whether related documentation needs to be updated.

  • User guides, API specs, system diagrams, or runbooks are updated.

Logging Added/Updated (Yes/No)

  • Appropriate log statements are added with meaningful messages.
  • Logging does not expose sensitive data.
  • Log levels are used correctly (e.g., info, warn, error).

Telemetry Added/Updated (Yes/No)

  • Custom telemetry (e.g., counters, timers, error tracking) is added as needed.
  • Events are tagged with proper metadata for filtering and analysis.
  • Telemetry is validated in staging or test environments.

Rollback Scenario and Process (Yes/No)

  • Rollback plan is documented.

Dependency Impact Assessed and Regression Tested (Yes/No)

  • All impacted internal modules, APIs, services, and third-party libraries are analyzed.
  • Results are reviewed and confirmed to not break existing functionality.

- Add System.Threading.Tasks.Dataflow package reference to fix NU1605 package downgrade error for .NET 8 builds
- Add DOTNET_ROOT export to ensure tests use local SDK runtime (10.0.1) instead of global
- Add target framework validation to catch invalid values like '.net8.0' early with helpful error message
@tarunramsinghani tarunramsinghani requested review from a team as code owners February 4, 2026 10:23
azure-pipelines-bot and others added 8 commits February 4, 2026 17:27
Convert DOTNET_ROOT to Windows-style path (C:\path) on Windows platform
so that native dotnet test commands can locate the correct runtime.
Print dotnet location (where/which), DOTNET_ROOT, and available runtimes
before running tests to help troubleshoot runtime resolution issues.
The testhost was failing to find the .NET runtime because DOTNET_ROOT
contained '..' which wasn't being resolved correctly. Using 'cd && pwd'
ensures we get a clean absolute path that the runtime host can use.
The testhost process wasn't finding the runtime because DOTNET_ROOT
set in bash wasn't being inherited by child processes spawned by MSBuild.
Use the Exec task's EnvironmentVariables attribute to explicitly pass
DOTNET_ROOT to ensure the testhost can locate the .NET runtime.
…ution

The native testhost.exe was probing for .NET runtime next to itself
instead of respecting DOTNET_ROOT. By excluding build assets from
Microsoft.TestPlatform.TestHost, VSTest falls back to using
dotnet testhost.dll which properly respects DOTNET_ROOT.
The testhost.exe DOTNET_ROOT issue is now fixed in Test.csproj by
excluding build assets. Removed diagnostic echo commands, DotNetSdkRoot
property, and EnvironmentVariables workaround that are no longer needed.
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.

1 participant