0

A .NET Standard 2.1 library has a package reference to FxCop like so:

<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.5">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

A .NET Core 3.0 app references this Standard library. When I publish the app, several Microsoft.CodeAnalysis dlls appear in the publish directory. They "shouldn't", but I don't know why they shouldn't so therefore I don't know how to tell them to not be there.

A recent question from ASP.NET has a similar problem, but I can't glean anything useful from it.

  • 1
    Apologies, the entire .NET build process is a mystical black box to me. I have trouble researching build problems because I can't find the words to write in the search box. – The Most Curious Thing Oct 18 '19 at 02:08
  • Cannot reproduce this. You will have to share more information about your project. – Lex Li Oct 18 '19 at 03:45
  • 1
    @LexLi Thanks for the response. The vibe I'm getting is that this is just another enigma of the build system without a solution, or a solution that will manifest when I least expect it. For now I will let the problem the simmer. Thank you! – The Most Curious Thing Oct 21 '19 at 01:42
  • The build engine MSBuild and .NET Core CLI are both open sourced, so if you do have a way to reliably reproduce it, open an issue and let Microsoft investigate it https://github.com/microsoft/msbuild – Lex Li Oct 21 '19 at 01:50

0 Answers0