Skip to content

Ensure <Using /> declarations from in-box SDKs are conditioned on C# #19793

Closed

Activity

  1. ghost added
    untriaged
    on Aug 17, 2021
  2. mhutch commented on Aug 17, 2021

    @mhutch
    Contributor

    To be absolutely explicit, is this the behavior (and pattern) we expect targets in all the workload SDKs to follow?

    <ItemGroup Condition="'$(Language)' == 'C#' And ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable')">

    Should we have the SDK targets compute a property to centralize this logic? For example, if the SDK targets did this:

    <PropertyGroup>
      <_CSharpImplicitUsings
          Condition="'$(Language)' == 'C#' And ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' =='enable')"
      >
      true
      </_CSharpImplicitUsings>
    </PropertyGroup>

    Then workload targets could do this:

    <ItemGroup Condition="'$(_CSharpImplicitUsings)' == 'true')">
  3. DamianEdwards commented on Aug 17, 2021

    @DamianEdwards
    MemberAuthor

    @mhutch that satisfies the desired specificity I think, so sure 😃

  4. added a commit that references this issue on Aug 18, 2021
  5. added a commit that references this issue on Aug 19, 2021
  6. added a commit that references this issue on Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-ImplicitUsingsuntriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions