Skip to content

Revise dotnet test behavior if test app targets netX.0;netX.0-windows #49924

@Youssef1313

Description

@Youssef1313

private TestProgressState GetOrAddAssemblyRun(string assembly, string? targetFramework, string? architecture, string? executionId)
{
string key = $"{assembly}|{targetFramework}|{architecture}|{executionId}";
return _assemblies.GetOrAdd(key, _ =>
{
IStopwatch sw = CreateStopwatch();
var assemblyRun = new TestProgressState(Interlocked.Increment(ref _counter), assembly, targetFramework, architecture, sw);
int slotIndex = _terminalWithProgress.AddWorker(assemblyRun);
assemblyRun.SlotIndex = slotIndex;
return assemblyRun;
});
}

Both target frameworks will likely map to the same key. This can be buggy, especially with retry.

Note that targetFramework is best-effort and both netX.0 and netX.0-platform are likely going to map to netX.0 today.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions