microsoft/dotnet-apiport

Unable to analyzer app in .NET Core 3.0 Desktop API Analyzer

Closed this issue · 12 comments

Unable to analyze.
Details:
Detecting assembly references                      [Failed]

Cannot locate assembly information for System.Object. Microsoft assemblies found are:


Cannot locate assembly information for System.Object. Microsoft assemblies found are:


Cannot locate assembly information for System.Object. Microsoft assemblies found are:


Cannot locate assembly information for System.Object. Microsoft assemblies found are:

Can I somehow provide logs of some kind?

Getting this as well on one of three apps I've tested (this one is by far the most complex, with a mix of VB.NET and C#, and WinForms and WPF).

It does not happen if I use the command-line version and explicitly set the -f argument to the .exe rather than the entire directory, so the problem is presumably with one of the dependencies in the directory.

Same error message for me when running PortabilityAnalyzer.exe on my WPF app.

I have the same issue with my app.

I was able to pinpoint it down to a DLL, namely de\Microsoft.SqlServer.Types.Resources.dll (file version 2017.140.3006.16, product version 14.0.3006.16). I'm therefore guessing this is a problem with resource DLLs.

@chucker great analyses. I've removed all the resource assemblies from the app and now it works fine, thanks 👍

@conniey @twsouthwick

It looks like API Port cannot analyze resource assemblies (*..resources.dll) as those have no references (not even to mscorlib). That seems to crash the MD reader. I suggest we exclude any files that are named *.resources.dll. Is this something we can fix? A lot of our customers are hitting this now with the .NET Core 3.0 runs against WinForms/WPF assemblies.

@terrajobst I wrote a possible fix in #699.

In the meantime, temporarily moving out the resource assemblies while testing a directory is an OK workaround.

Thanks @chucker. Yes, deleting the resources file is a possible workaround.

(Do I need to ping someone to ask them to review my pull request?)

I'm pinging the API Port team. Your fix looks reasonabe to me but I'm hesitant to accept your changes as this isn't my code base. I'd rather @conniey or @twsouthwick would review & merge your PR.

I can confirm both problem and workaround.
Maybe worth mentioning: my first instinct was "this is caused by VB" because of the "System.Object" message - there are situations with packages that target the CLR (like Fody), where the "Missing System.Object" problem with VB projects pops up here and there.
But after simply removing System.Net.Http.Formatting.resources.dll in my case, I was able to analyze a very complex 4.7.2 WPF application, mixed VB and C# with no further issue. Made me happy :)

Seeing the same issue here with *.license.dll files, stemming from external components from GrapeCity.