Skip to content

Conversation

@Chryssie
Copy link

This should fix #86 and has done so in a project I work on.

@ghost
Copy link

ghost commented Aug 27, 2020

CLA assistant check
All CLA requirements met.

@rainersigwald
Copy link
Member

@Chryssie Thanks! Was the project you work on .NET Core or .NET Framework based? I believe the NuGet assemblies aren't in the folder next to MSBuild for Visual Studio (/.NET Framework MSBuild) scenarios.

@mhutch
Copy link

mhutch commented Dec 15, 2020

FWIW I used this patch from a test project and it broke ("MSBuild assemblies were already loaded" error) because the test SDK (Microsoft.NET.Test.Sdk etc) brings in NuGet.Frameworks and loads it before any of the locator code can run.

@rainersigwald
Copy link
Member

Thanks, @mhutch! @Forgind, sounds like more evidence we should go with the approach in #107 that makes assemblies available but doesn't complain if they're already loaded.

Note that #107 alone won't fix the NuGet problem because NuGet isn't next to MSBuild in VS scenarios, but I think it'll work for Core.

@rainersigwald
Copy link
Member

Since this by itself causes a problem and #107 should fix both, closing this. Thanks again @Chryssie!

@Forgind
Copy link
Contributor

Forgind commented Dec 15, 2020

Do you think it would make sense to also add that we look in Path.Combine(msbuildPath, "..", "..", "..", "Common7", "IDE", "CommonExtensions", "Microsoft", "NuGet") for anything starting with "NuGet" and ending in ".dll"?

@rainersigwald
Copy link
Member

@Forgind I think that's a reasonable start to tackling #86 for VS, yes.

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.

Should MSBuildLocator handle loading of NuGet assemblies?

4 participants