microsoft / microsoft/vs-mef

Allow C# records to be used as metadata views

Open
#343 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
464
Forks
93
Avg merge
3d 8h
Merged PRs (30d)
13

Description

Currently, if you try to use a record type as a metadata view, you get the following error:

System.NotSupportedException: 'The type [TYPE] is an unsupported type of metadata view.'

Given how convenient and concise they are, it would be quite handy if the export provider
supported record types as metadata views. It would just need to invoke the constructor
and any init properties as needed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the export provider's handling of metadata views and trace the path that raises the unsupported-type exception. Support C# record types by invoking their constructor and applying init properties, then verify that record metadata views no longer produce the unsupported-type error while existing metadata-view behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.