Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Enable setting the "NoWarn" option on a per-file basis #4087

Closed
fubar-coder opened this issue Jan 21, 2019 · 2 comments
Closed

Feature: Enable setting the "NoWarn" option on a per-file basis #4087

fubar-coder opened this issue Jan 21, 2019 · 2 comments
Labels

Comments

@fubar-coder
Copy link

Steps to reproduce

Example project file (as suggestion):

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <GenerateDocumentationFile Condition="'$(Configuration)' == 'Release'">true</GenerateDocumentationFile>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
  </ItemGroup>
  <ItemGroup>
    <Compile Update="Program.cs">
      <NoWarn>CS1591;$(NoWarn)</NoWarn>
    </Compile>
  </ItemGroup>
</Project>

Expected behavior

No CS1591 warning for Program.cs.

Actual behavior

I get a warning for Program.cs.

@rainersigwald
Copy link
Member

This is a C#-compiler feature request, so I'll move it to the Roslyn repo.

@rainersigwald
Copy link
Member

This issue was moved to dotnet/roslyn#32672

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants