Mefx like command line tool#271
Conversation
Playground
Codecov Report
@@ Coverage Diff @@
## main #271 +/- ##
==========================================
- Coverage 89.65% 89.55% -0.10%
==========================================
Files 87 87
Lines 6088 6111 +23
==========================================
+ Hits 5458 5473 +15
- Misses 630 638 +8
Continue to review full report at Codecov.
|
6 is LTS and already broadly available.
|
Devesh, maybe this regressed when you removed the custom It looks like .NET Core rejects it because only the assembly name is passed to |
|
Note: please |
|
Hello, As you correctly guessed the issue was because of the fact that I removed the The issue is that the standard loader calls Doing so meant that when I run the following command on the command line Since to load any assemblies in Mefx a file path must be specified, this means that we will always have a file path for every assembly we want to load. This means that in reality, we will always load assemblies using the
I was wondering how much of an issue is the fact that LoadFrom doesn't use the default load context is in this case and what steps would you recommend to rectify it? |
|
Thank you!
There are ways to rectify it (using Note that some assemblies will actually load in the default context though -- assemblies that load implicitly because the ones we explicitly load reference them. Any assembly in the GAC or in the tool's own exe directory are candidates for loading automatically. That's as it should be, but just something to be aware of. And speaking of assemblies loading implicitly, that's the next major work item to resolve in this new tool from my testing yesterday. I tried passing just one relatively simple dll from the VS installation to this tool and it failed with many assembly load errors. We need to be able to pass an .exe.config file to the tool so that it can resolve assemblies the same way a running app would. I have a (non-trivial) class that already does this for another purpose, so I'll wire it in as a switch to your tool and add to your PR. |
AArnott
left a comment
There was a problem hiding this comment.
Thank you so much for this contribution.
* Bump xunit from 2.8.0 to 2.8.1 Bumps [xunit](https://github.com/xunit/xunit) from 2.8.0 to 2.8.1. - [Commits](xunit/xunit@2.8.0...2.8.1) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Bump Microsoft.NET.Test.Sdk from 17.9.0 to 17.10.0 Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.9.0 to 17.10.0. - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](microsoft/vstest@v17.9.0...v17.10.0) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Bump xunit.runner.visualstudio from 2.8.0 to 2.8.1 Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.8.0 to 2.8.1. - [Release notes](https://github.com/xunit/visualstudio.xunit/releases) - [Commits](xunit/visualstudio.xunit@2.8.0...2.8.1) --- updated-dependencies: - dependency-name: xunit.runner.visualstudio dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
No description provided.