Skip to content

Add adapter dlls as reference#7389

Merged
Youssef1313 merged 2 commits intomainfrom
dev/ygerges/simplify-targets
Feb 12, 2026
Merged

Add adapter dlls as reference#7389
Youssef1313 merged 2 commits intomainfrom
dev/ygerges/simplify-targets

Conversation

@Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Feb 12, 2026

I don't think it's reasonable to only copy adapter to the output directory without adding it as a reference. When added as a reference, it's passed to the compiler, and it's known by ResolveAssemblyReferences, which ensures we do the right thing especially when it comes to generating binding redirects.

In addition, this gets us a step closer towards having the adapter assemblies just in lib, similar to any other NuGet package. But doing this is technically a breaking change for some legacy projects that rely on the assemblies being packed in a specific directory.

Also the current approach of copying with PreserveNewest is wrong. It should have been IfDifferent (which is more recent - and if we want to support older SDK versions that don't have IfDifferent we will have to have more complex logic around it). When PreserveNewest is used, if user did a build, updated their csproj to downgrade MSTest version, then did a build again, the wrong version will be in output directory, because it has a more recent timestamp.

Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fingers crossed that we don't break unknown old scenarios.

@Youssef1313 Youssef1313 merged commit 1daaeb4 into main Feb 12, 2026
10 checks passed
@Youssef1313 Youssef1313 deleted the dev/ygerges/simplify-targets branch February 12, 2026 20:55
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.

2 participants