如何获取“发布网站”命令为我的Visual Studio 2005网站项目发出PDB文件?

时间:2021-08-07 03:33:37

I have a VS 2005 Web Site project (not the web application project model, the 'web site' project model) and I want to be able to include the PDB files for the page assemblies in the bin folder via the "Publish Website" command within Visual Studio to help out with debugging an issue.

我有一个VS 2005网站项目(不是Web应用程序项目模型,'网站'项目模型),我希望能够通过“发布网站”命令在bin文件夹中包含页面程序集的PDB文件在Visual Studio中帮助调试问题。

No matter what I try with regard to the "Debug/Release" mode settings, I can't seem to get PDB files for the website assemblies to show up in the 'bin' folder once I've published the site. I do get them for any externally references assemblies, but not for the actual website code-behind assemblies, which is what I need.

无论我尝试关于“调试/释放”模式设置,我发布网站后,似乎无法让网站程序集的PDB文件显示在“bin”文件夹中。我确实得到任何外部引用程序集,但不是实际的网站代码隐藏程序集,这是我需要的。

How do I get Visual Studio to include these files when publishing using the web site project model?

使用网站项目模型发布时,如何让Visual Studio包含这些文件?

1 个解决方案

#1


5  

The Publish command always compiles your project for release and I haven't found a way to cause the pdb files to be generated during the precompile.

Publish命令总是编译您的项目以供发布,我还没有找到一种方法来在预编译期间生成pdb文件。

There is a workaround I have tried. If when you precompile you check the box "Allow this precompiled site to be updatable" and then update the web site in place this results in a dynamic compilation. The dynamic compilation should produce debug code and pdb files if your web.config settings has:

我尝试过一种解决方法。如果在预编译时选中“允许此预编译站点可更新”框,然后更新网站,则会生成动态编译。如果您的web.config设置具有以下内容,则动态编译应生成调试代码和pdb文件:

 <compilation defaultLanguage="your language" debug="true" />

Here is a good blog post about the different publish options.

这是一篇关于不同发布选项的好文章。

#1


5  

The Publish command always compiles your project for release and I haven't found a way to cause the pdb files to be generated during the precompile.

Publish命令总是编译您的项目以供发布,我还没有找到一种方法来在预编译期间生成pdb文件。

There is a workaround I have tried. If when you precompile you check the box "Allow this precompiled site to be updatable" and then update the web site in place this results in a dynamic compilation. The dynamic compilation should produce debug code and pdb files if your web.config settings has:

我尝试过一种解决方法。如果在预编译时选中“允许此预编译站点可更新”框,然后更新网站,则会生成动态编译。如果您的web.config设置具有以下内容,则动态编译应生成调试代码和pdb文件:

 <compilation defaultLanguage="your language" debug="true" />

Here is a good blog post about the different publish options.

这是一篇关于不同发布选项的好文章。