在 Release 中部署 PDB 文件

6

本文介绍了在 Release 中部署 PDB 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我设置了 CI 服务器来构建和部署我的所有环境,包括我的生产环境.据我所知,我的所有项目文件的设置和 CI 设置在我的暂存环境构建和我的生产环境构建之间是相同的.但是当我部署到生产环境时,没有像暂存中那样与 DLL 文件并排放置的 PDB 文件.这是部署每个应用程序的脚本:

I have my CI server setup to build and deploy all of my environments including my production environment. From what I can tell my setup for all of my project files and CI settings are the same between my Staging environment build and my Production environment build. But when I deploy to production there are no PDB files sitting alongside the DLL files like there are in staging. Here is the script that deploys each application:

C:WindowsMicrosoft.NETFramework64v4.0.30319MSBuild.exe %location% ^
    /p:Configuration=%configName% ^
    /p:DeployOnBuild=True ^
    /p:DeployTarget=MSDeployPublish ^
    /p:AllowUntrustedCertificate=True ^
    /p:MSDeployPublishMethod=WMSvc ^
    /p:CreatePackageOnPublish=True ^
    /p:MsDeployServiceUrl=https://%serverName%:8172/MsDeploy.axd ^
    /p:DeployIisAppPath=%siteName% ^
    /p:UserName=%username% ^
    /p:Password=%password%

所以看起来当 Configuration=Release 时 PDB 文件被留下了,尽管它们是在构建服务器上生成的.有什么想法吗?

So it seems like when the Configuration=Release the PDB files are left behind, though they are getting generated on the build server. Any ideas?

推荐答案

如果要在发布中包含 pdb 文件,请转到项目属性和打包/发布 Web 选项卡,取消选中排除生成的调试符号"

If you want to include the pdb files with the publish, go the project properties and Package/Publish Web Tab, Uncheck the "Exclude Generated Debug Symbols"

这篇关于在 Release 中部署 PDB 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

C# 中的多播委托奇怪行为?
Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)...
2023-11-11 C#/.NET开发问题
6

如何将代表存储在列表中
How to store delegates in a List(如何将代表存储在列表中)...
2023-11-11 C#/.NET开发问题
6

Delegate.CreateDelegate() 和泛型:错误绑定到目标方法
Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)...
2023-11-11 C#/.NET开发问题
14

具有未知类型的 CreateDelegate
CreateDelegate with unknown types(具有未知类型的 CreateDelegate)...
2023-11-11 C#/.NET开发问题
5

Func<T>.BeginInvoke 使用线程池吗?
Does Funclt;Tgt;.BeginInvoke use the ThreadPool?(Funclt;Tgt;.BeginInvoke 使用线程池吗?)...
2023-11-11 C#/.NET开发问题
6

如何为具有空目标的实例方法创建委托?
How to create a delegate to an instance method with a null target?(如何为具有空目标的实例方法创建委托?)...
2023-11-11 C#/.NET开发问题
6