使用 Visual Studio 2022 17.1 在托管库中嵌入 *.pdb 文件

Embed *.pdb files in managed library with Visual Studio 2022 17.1

Visual Studio 2022 的 17.1 更新最近发布,新增功能之一是:

When building managed libraries developers can choose to embed their source files with the debug information (PDB file) that is produced by the build, and even embed the PDB file into the assembly itself. We now surface embedded source as part of Go to Definition if a referenced assembly has embedded source and the PDB is available. This allows you to navigate to the original source files that declare the target symbol. Place your cursor on a symbol and press F12 to navigate to the original source file.

但是我找不到任何关于如何做到这一点的信息。
有人知道吗?

此外,如果我想将一个包发布到 NuGet 并使其成为任何将该包添加到他们的解决方案的人都可以调试我的包的代码,我是否只需要嵌入 PDB 还是需要更多的东西?

原来这是在项目属性中找到的一个选项: