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

.net 5 single-file deployment robustness #65

Closed
haraldsteinlechner opened this issue Jul 26, 2021 · 2 comments
Closed

.net 5 single-file deployment robustness #65

haraldsteinlechner opened this issue Jul 26, 2021 · 2 comments

Comments

@haraldsteinlechner
Copy link
Member

haraldsteinlechner commented Jul 26, 2021

in introspection/plugin loading we heavily make use of assembly.location et al. This is no longer possible in .net 5 - https://docs.microsoft.com/en-us/dotnet/api/system.reflection.assembly.location?view=net-5.0#remarks

the background description can be found here: https://github.com/dotnet/designs/blob/main/accepted/2020/single-file/design.md

In 5f67063 we took a first step towards this goal and made some bits generally more robust, e.g. got rid of those:

nhandled exception. System.ArgumentException: The path is empty. (Parameter 'path')
   at System.IO.Path.GetFullPath(String path)
   at System.IO.File.GetLastWriteTimeUtc(String path)
   at Aardvark.Base.CachingProperties.GetIdentifier(Assembly asm, NamingScheme scheme)
   at Aardvark.Base.Introspection.GetQueryCacheFilename(Assembly asm, Guid queryGuid)
   at Aardvark.Base.Introspection.GetAll___[T](Assembly a, String discriminator, Func`2 decode, Func`2 createResult, Func`2 encode)
   at Aardvark.Base.Introspection.GetAllMethodsWithAttribute[T](Assembly a)
   at Aardvark.Base.Aardvark.LoadAll(IEnumerable`1 xs)
   at Aardvark.Base.Aardvark.Init()
   at Program.main(String[] argv)

What remains is to find a solution which allows us to scan for potential plugin assemblies.

There are numerous projects with similar problems. Maybe we can get some information there, e.g. nuke-build/nuke#764

@haraldsteinlechner

This comment has been minimized.

@haraldsteinlechner haraldsteinlechner changed the title Introspection & Self-contained single-file deployment Make aardvark introspection/plugin system .net 5 single-file deployment ready Aug 9, 2021
@haraldsteinlechner haraldsteinlechner changed the title Make aardvark introspection/plugin system .net 5 single-file deployment ready .net 5 single-file deployment robustness Aug 9, 2021
@hyazinthh
Copy link
Member

Fixed this, plugin loading support was a bit tricky because you have to get the assemblies from the bundle. This library makes this easy fortunately: https://github.com/Droppers/SingleFileExtractor

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

No branches or pull requests

2 participants