简体   繁体   English

不要将已安装的NuGet包中的PDB复制到/ bin / Release中

[英]Don't copy PDBs from installed NuGet packages into /bin/Release

There are two kinds of references: references to my projects (in my case, they are all in the same solution) and references to assemblies from NuGet packages. 有两种引用:对我的项目的引用(在我的例子中,它们都在同一个解决方案中)和对NuGet包中的程序集的引用。 PDBs for the first category are useful, and I don't care at all about PDBs for the second category (please, correct me if I'm wrong in my reasoning and I actually should care about all PDBs). 第一类PDB是有用的,我根本不关心第二类PDB(如果我的推理错了,请纠正我,我实际上应该关心所有的PDB)。

Some of the PDBs are really huge (like AWSSDK.pdb which weights about 30MB) and I don't want them in my bin folder. 一些PDB非常庞大(如AWSSDK.pdb ,重量约30MB),我不希望它们在我的bin文件夹中。 I could eliminate all the PDBs using this msbuild flag . 我可以使用这个msbuild标志消除所有PDB。 But I want to keep the good ones (mine) intact. 但我想保持好的(我的)完好无损。

I could also add a post-build step which will remove all pdbs with name not starting with MyUniqueProjectPrefix. 我还可以添加一个构建后的步骤,它将删除名称不以MyUniqueProjectPrefix.开头的所有MyUniqueProjectPrefix. , but it feels like a hack. ,但感觉就像一个黑客。

Is there a clean way? 有干净的方式吗?

The package creator should not have included the .pdb in the package, but should have pushed a Symbol package to Nuget . 包创建者不应该在包中包含.pdb而应该将Symbol包推送到Nuget

The best solution would be to contact the package author to update his package to use this feature. 最好的解决方案是联系包作者以更新他的包以使用此功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM