Skip to content

Commit 7d6eff3

Browse files
Sergio0694Copilot
andcommitted
Skip emitting [ApiContract] attribute for implementation assemblies
Treat [ApiContract] like [ContractVersion] in the metadata attribute filter: only emit it for reference projections and skip it when generating implementation assemblies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3e1cd18 commit 7d6eff3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cswinrt/code_writers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2582,8 +2582,8 @@ remove => %;
25822582
{
25832583
allow_multiple = true;
25842584
}
2585-
// ContractVersion is only emitted for reference assemblies
2586-
if (attribute_name == "ContractVersion")
2585+
// ContractVersion and ApiContract are only emitted for reference assemblies
2586+
if (attribute_name == "ContractVersion" || attribute_name == "ApiContract")
25872587
{
25882588
if (!settings.reference_projection)
25892589
{

0 commit comments

Comments
 (0)