Skip to content

Respect deps.json#7520

Merged
Forgind merged 6 commits into
dotnet:mainfrom
Forgind:testrainerchange
Apr 19, 2022
Merged

Respect deps.json#7520
Forgind merged 6 commits into
dotnet:mainfrom
Forgind:testrainerchange

Conversation

@Forgind

@Forgind Forgind commented Apr 5, 2022

Copy link
Copy Markdown
Contributor

Fixes #4081 and #1887; progress towards #5037

Context
MSBuild doesn't currently respect .deps.json files for plugins (tasks). This can lead to incorrect versions of assemblies being found as finding the AnyCPU version of an assembly instead of the windows-specific version.

Changes Made
Use AssemblyDependencyResolver as a second pass (after looking for "well-known assemblies") to automatically use the deps.json file to find the right assembly.

Testing
Verified that for a task assembly with a rid-specific dependency, it finds the rid-specific dependency as specified by the deps.json file. Also verified that it can find native assemblies and that the issue that inspired this (dotnet/sdk#23498) no longer reproduces after giving nuget a .deps.json file specifying the correct version.

@rainersigwald rainersigwald added this to the VS 17.3 milestone Apr 7, 2022
Comment thread src/Framework/ChangeWaves.cs Outdated
Comment thread src/Framework/ChangeWaves.cs
@benvillalobos benvillalobos added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Apr 15, 2022
@Forgind Forgind merged commit 75795a4 into dotnet:main Apr 19, 2022
@Forgind Forgind deleted the testrainerchange branch April 19, 2022 22:27
rainersigwald added a commit to rainersigwald/msbuild that referenced this pull request Apr 22, 2022
@Forgind Forgind mentioned this pull request May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider adopting ComponentDependencyResolver for tasks on Core

3 participants