dotnet/msbuild

Add explicit tests around CompareAssemblyIdentity implementation

Open

#5974 opened on Dec 16, 2020

View on GitHub
 (0 comments) (1 reaction) (0 assignees)C# (5,062 stars) (1,364 forks)batch import
help wantedtestingtriaged

Description

Before the .NET Core port, ResolveAssemblyReferences compared assembly identities using a native method call:

https://github.com/Microsoft/msbuild/blob/a939f1547a3f8b91512d0d2d270a8d0f0111e7e7/src/XMakeTasks/NativeMethods.cs#L976-L985

Now, there's a managed implementation that optionally calls that one on Windows:

https://github.com/dotnet/msbuild/blob/a8efaf15afcaf5fce9cb6e1c3b7c94e0c88d804b/src/Tasks/NativeMethods.cs#L1114-L1136

We should have tests that validate that implementation using the native method as a reference. This is a nice unit-testing problem since it's functional and idempotent, so we can probably hit 100% code coverage.

Related: #3930, #5973

Contributor guide