在Release部署PDB文件文件、Release、PDB

2023-09-03 12:19:50 作者:活的够呛。

我有我的CI服务器的设置来构建和部署我所有的环境,包括我的生产环境。从我可以告诉我的设置为我所有的项目文件和CI设置为我临时环境的构建和我的生产环境建设之间的相同。但是,当我部署到生产环境没有任何PDB文件坐在旁边的DLL文件像有分期。下面是部署的每个应用程序的脚本:

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:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.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%

因此​​,它似乎是在配置=释放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?

推荐答案

如果你想包括与发布,进入项目属性,封装/发布Web选项卡,取消选中排除生成的调试符号的pdb文件

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"

 
精彩推荐
图片推荐