This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
Add an option to only generate metadata for complete types - #6149
Merged
MichalStrehovsky merged 1 commit intoJul 30, 2018
Merged
Conversation
When the option is set, metadata generation at the type level becomes all or nothing - either the entire type gets metadata, or none of it gets it. This makes a certain class of missing metadata issues easier to troubleshoot.
jkotas
approved these changes
Jul 30, 2018
Member
Author
|
Just for the record, enabling this option causes about 6% size on disk regression for ASP.NET plaintext app. Half of the regression is in the metadata alone, the other half seems to be because we promoted a bunch of C# generated state machine classes to constructed types (I assume because they show up in a So while this would be nice to have enabled by default, it probably goes in the same bucket as to why we don't want to enable stack trace metadata by default. Making apps bigger is easy, making them small is hard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the option is set, metadata generation at the type level becomes all or nothing - either the entire type gets metadata, or none of it gets it. This makes a certain class of missing metadata issues easier to troubleshoot.
In particular, the failure mode of this program:
Changes from a
NullReferenceExceptionat the.Invokepart to a"This object cannot be invoked because it was metadata-enabled for browsing only: 'Program.Do()' For more information, please visit http://go.microsoft.com/fwlink/?LinkID=616867"message.Should turn #6142 and similar into a self-service solution.