Skip to content

Misnamed item types for assembly resources #53207

@KalleOlaviNiemitalo

Description

@KalleOlaviNiemitalo

Type of issue

Code doesn't work

Description

The topic on "C# Compiler Options that specify resources" shows examples:

<Resources Include=filename>
  <LogicalName>identifier</LogicalName>
  <Access>accessibility-modifier</Access>
</Resources>
<LinkResources Include=filename>
  <LogicalName>identifier</LogicalName>
  <Access>accessibility-modifier</Access>
</LinkResources>

However, when the CoreCompile target in Microsoft.CSharp.Core.targets runs the Csc task, it passes those parameters as Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)" and LinkResources="@(LinkResource)". _CoreCompileResourceInputs is an internal item type that the _GenerateCompileInputs target populates from @(EmbeddedResource). So the examples should add items to the EmbeddedResource item type rather than Resources, and to the LinkResource (singular) item type rather than LinkResources (plural).

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/resources

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/compiler-options/resources.md

Document Version Independent Id

a6872789-cb8f-92bb-80eb-188fc83008b5

Platform Id

83c527d3-60fb-b0a0-5850-42445e9385b5

Article author

@BillWagner

Metadata

  • ID: 66377285-d7d5-552b-2330-cbb7cb4b9b79
  • PlatformId: 83c527d3-60fb-b0a0-5850-42445e9385b5
  • Service: dotnet-csharp
  • Sub-service: lang-reference

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions