Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

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

Closed
GeertvanHorrik opened this issue Aug 8, 2018 · 12 comments · Fixed by #699
Closed

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

GeertvanHorrik opened this issue Aug 8, 2018 · 12 comments · Fixed by #699

Comments

@GeertvanHorrik
Copy link

GeertvanHorrik commented Aug 8, 2018

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?

@GeertvanHorrik GeertvanHorrik changed the title Unable to analyzer Unable to analyzer app in .NET Core 3.0 Desktop API Analyzer Aug 8, 2018
@chucker
Copy link
Contributor

chucker commented Aug 8, 2018

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.

@MichaelVach
Copy link

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

@denisbredikhin
Copy link

I have the same issue with my app.

@chucker
Copy link
Contributor

chucker commented Aug 9, 2018

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.

@GeertvanHorrik
Copy link
Author

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

@terrajobst
Copy link
Member

@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.

@chucker
Copy link
Contributor

chucker commented Aug 10, 2018

@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.

@terrajobst
Copy link
Member

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

@chucker
Copy link
Contributor

chucker commented Aug 10, 2018

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

@terrajobst
Copy link
Member

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.

@themightylc
Copy link

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 :)

@eyvindwa
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants