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 #32672

Open
rainersigwald opened this issue Jan 22, 2019 · 1 comment
Open

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

rainersigwald opened this issue Jan 22, 2019 · 1 comment

Comments

@rainersigwald
Copy link
Member

From @fubar-coder on January 21, 2019 13:57

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.

Copied from original issue: dotnet/msbuild#4087

@rainersigwald
Copy link
Member Author

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

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

No branches or pull requests

3 participants