2

I am in the process of creating a nuget package for stylecop so that we can use it across all the microservices and other projects. I am looking to have multiple GlobalSuppressions files, and add them to projects based on the project name where I will be installing this package.

        <ItemGroup condition="...">
        <Content Include="GlobalSuppressions.cs" target="Content">
            <CopyToOutputDirectory>true</CopyToOutputDirectory>
            <IncludeInPackage>true</IncludeInPackage>
            <BuildAction>Compile</BuildAction>
        </Content>
    </ItemGroup>
<ItemGroup condition="...">
        <Content Include="Tests/GlobalSuppressions.cs" target="Content">
            <CopyToOutputDirectory>true</CopyToOutputDirectory>
            <IncludeInPackage>true</IncludeInPackage>
            <BuildAction>Compile</BuildAction>
        </Content>
    </ItemGroup>

I need to add a condition to this ItemGroup, looking for parameter name for the project name

Srikanth
  • 147
  • 1
  • 2
  • 15

0 Answers0