loxsmoke / mddox

Markdown documentation generator tool
MIT License
37 stars 10 forks source link

mddox fails to load against UWP assembly #10

Closed asklar closed 4 years ago

asklar commented 4 years ago

I'm trying to document a winmd file (a UWP WinRT component) but mddox can't seem to load it:

> mddox TreeDumpLibrary.winmd

Error: Could not load file or assembly 'TreeDumpLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
   at System.Reflection.Assembly.LoadFile(String path)
   at MdDox.Program.Main(String[] args) in C:\Dev\mddox\src\Program.cs:line 194
loxsmoke commented 4 years ago

Try version 0.5.1 and see if it works.

asklar commented 4 years ago

@loxsmoke no dice, same error...

Error: Could not load file or assembly 'TreeDumpLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at MdDox.Program.Main(String[] args) in C:\Dev\mddox\src\Program.cs:line 189
loxsmoke commented 4 years ago

You tried to document WinMD which is a different format. I do not think that .net core 3.1 can load this type of the file.

asklar commented 4 years ago

@loxsmoke looks like this works with the code in master, just not with what's released. Loading WinRT assemblies is supported in .netcore 3.0 preview 5 onwards, see https://github.com/Microsoft/dotnet/issues/590

loxsmoke commented 4 years ago

That is weird. Must be something with tooling.