Improvements to Console Runner under .NET 8.0 - #1891
Conversation
fffb6cb to
1e90166
Compare
|
As it stands, this PR is a first cut at running agents under the NetCore build of the console runner. Current limitations...
|
manfred-brands
left a comment
There was a problem hiding this comment.
I few small remarks, but mostly it is removing conditional compilation.
| #else | ||
| // ReflectionOnlyLoad isn't available on .NET Core / .NET 5+. Load the assembly into the | ||
| // default context for inspection instead, and skip assemblies without a physical location. | ||
| var dependency = Assembly.Load(dependencyName); |
There was a problem hiding this comment.
There is a specific [MetadataLoadContext](https://learn.microsoft.com/en-us/dotnet/standard/assembly/inspect-contents-using-metadataloadcontext
There was a problem hiding this comment.
Thanks... I'll use that.
|
For the moment, I'm leaving classes Issue #1890 suggests replacing that nomenclature with a TFM. You commented on it and I was waiting to see if anyone else had comments before doing it. I'll do a PR for that issue and replace I'll apply your other suggestions and merge this. Once I have all four agents working under the .NET 8.0 runner, I'll be able to activate all the package tests for it and start to deal with the limitations I listed. |
|
@manfred-brands A question for you... Have you built a dotnet tool containing package dependencies? I can't seem to make it work. When the package is installed, the dependencies are not automatically pulled into the install directory, where they need to be in order to be located by the extension service. Right now, my package tests are passing by explicitly loading the .NET 10 pluggable agent. But that won't help users who install the runner and find it doesn't work because there are no agents. |
I pack using.csproj properties instead of a manual .nuspec file. Are those dependencies tools themselves?
The suggested approach adding a dotnet tool manifest to your package (.config/dotnet-tools.json) which contains the tool dependencies.
However those will likely all be in their own subdirectory. |
|
I'm packing via the csproj for the netcore runner. The standard runner is using a nuspec because I wasn't able to make it work any other way.
That got me thinking. All of our extensions have traditionaly held their code under a "tools" directory, even though none of them are dotnet tools or even executables. The pluggable agents contain an executable, of course, but the "extension" part is actually the launcher, which runs that executable. The extension service even uses a file pattern that includes "tools" to locate installed extensions.
Fortunately, that's exactly what I want, provided I can find the subdirectory! |
Partial fix of #1101
Fixes #946