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

API Port flags compiler generated code in portable class libraries #273

Closed
mtaron opened this issue Mar 2, 2016 · 6 comments
Closed

API Port flags compiler generated code in portable class libraries #273

mtaron opened this issue Mar 2, 2016 · 6 comments

Comments

@mtaron
Copy link

mtaron commented Mar 2, 2016

Hi, I'm trying out API Port on one of my project and noticed that it was flagging some compiler generated code. A simple repro:

  1. Create a new Portable Class Library (I did C#, .NET Framework 4.6, Windows Universal 10.0).
  2. Add a new Resource File (.resx).
  3. Build.
  4. Run API Port.

It flags the compiler generated ResourceManager property as a portability issue. Is this is a problem?

@conniey
Copy link
Member

conniey commented Mar 2, 2016

This is a known issue #113.

As a tangential aside, the C# backing to *.resx is generated by an external tool (ie. resgen.exe) and not the C# compiler.

@twsouthwick
Copy link
Member

@conniey this doesn't seem the same as #113 - there, TypeInfo is showing up due to it being derived and thus showing up as being on Type. This is an issue involving generated methods/types. These are usually annotated with some sort of attribute - maybe we could add a way to filter those out?

@twsouthwick
Copy link
Member

An example: https://github.com/Microsoft/dotnet-apiport/blob/master/src/Microsoft.Fx.Portability/Resources/LocalizedStrings.Designer.cs

The type has [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] which we may be able to filter out - not sure how much work that would be in the metadata reader.

@conniey
Copy link
Member

conniey commented Mar 10, 2016

Ahh, I see what you're saying now.. Hmm that may be a little work due to how we calculate the docIds in MetadataReader.

@conniey
Copy link
Member

conniey commented Jun 5, 2017

Look at this feature when IOperation is available. This issue also applies to any compiler generated syntax commonly found on VB and F# assemblies.

@Lxiamail
Copy link
Member

Rerun the resgen tool supporting .NET standard should fix the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Future
Awaiting triage
Development

No branches or pull requests

4 participants