Skip to content

Incremental builds are broken when using the Microsoft.NET.Test.Sdk package #3266

Description

@ViktorHofer

Description

When building a test project which references the Microsoft.NET.Test.Sdk nuget package, incremental builds are broken because of double writes:

image

Steps to reproduce

dotnet new xunit -n xunittest
cd xunittest
dotnet build
dotnet build /bl

Expected behavior

There shouldn't be any double writes observable in the msbuild binary log file (which can be opened with the msbuild log viewer).

Actual behavior

The msbuild binary log viewer shows double writes (see picture above) which causes incremental builds to be broken which means that the affected test library needs to always be fully rebuilt. This is especially noticeable for customers when having many test assemblies which are built (i.e. via a sln file).

Diagnostic logs

Not required as this is about building and not running any tests so the test adapter isn't even invoked.

Environment

Windows, SDK version 6.0.200-preview.21617.4.

cc @nohwnd

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions