Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use extension in Next-to-MSBuild fallback #6558

Merged

Conversation

rainersigwald
Copy link
Member

The idea behind the fallback was that we'd load an assembly
that matched (by simple name) from the MSBuild directory if
there wasn't a match in the task/plugin folder. But
assemblies aren't in the MSBuild folder (or anywhere on disk)
by simple name: they have an extension. So this was never
working.

That was mostly irrelevant, because the assemblies that are
'next to MSBuild' in the .NET SDK are in MSBuild.deps.json
as assembled in the SDK repo. But in our own bootstrap build,
that's not the case and the normal fallback matters.

The idea behind the fallback was that we'd load an assembly
that matched (by simple name) from the MSBuild directory if
there wasn't a match in the task/plugin folder. But
assemblies aren't in the MSBuild folder (or anywhere on disk)
by simple name: they have an extension. So this was never
working.

That was mostly irrelevant, because the assemblies that are
'next to MSBuild' in the .NET SDK are in MSBuild.deps.json
as assembled in the SDK repo. But in our own bootstrap build,
that's not the case and the normal fallback matters.
@rainersigwald
Copy link
Member Author

This brings up a question: if we've accidentally not been doing this fallback for . . . ever, should we just remove it?

@brianrob might have thoughts related to dotnet/sdk#15558.

rainersigwald added a commit that referenced this pull request Jun 17, 2021
Normally DependencyModel is resolvable in dotnet build scenarios because
it is in the SDK folder next to MSBuild. However, in our
bootstrap MSBuild, that wasn't the case. Grab that file from the SDK
that we're using to build and drop it next to the SDK task assemblies (not 
next to MSBuild, because of #6558).
@rainersigwald rainersigwald changed the title Next-to-MSBuild fallback extension Use extension in Next-to-MSBuild fallback (so it might work) Jul 12, 2021
@rainersigwald
Copy link
Member Author

This brings up a question: if we've accidentally not been doing this fallback for . . . ever, should we just remove it?

To be clear on this issue, I think this isn't true and this PR will fix #5073.

@rainersigwald rainersigwald 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 Jul 12, 2021
@benvillalobos benvillalobos changed the title Use extension in Next-to-MSBuild fallback (so it might work) Use extension in Next-to-MSBuild fallback Jul 14, 2021
@benvillalobos benvillalobos merged commit 415cd42 into dotnet:main Jul 14, 2021
@rainersigwald rainersigwald deleted the load-assembly-from-extension branch August 18, 2021 16:11
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.

None yet

3 participants