Unwanted PDB files

Topics: Getting Started/Beginner, Server Deployment
Jul 26, 2011 at 5:37 PM

Hi,

in my Deployment.btfproj I have set deploypdbstogac as false for Debug AND Release.  However when you look at the log the pdb's are being built and packaged :-(

What is worse is that I had one assembly that did not have one for release. When the kit was being built there was no failure however the installation on a live server failed because it wasn't there. Does this setting do anything?

thanks

m

<DeployPDBsToGac>false</DeployPDBsToGac>

Coordinator
Jul 26, 2011 at 6:12 PM

PDB's are always packaged into the MSI if they exist next to the DLL's that are being packaged.  The MSI build will never fail due to the presence or absence of a .PDB.

I would appreciate more information about the failure that you mentioned.  I am not aware of any case where a failure can occur due to a missing PDB when DeployPDBsToGac is set to false.  Are you actually seeing PDB's show up in the GAC?  (You'd have to check from a Command Prompt doing directory listings inside the GAC folders.)

Thanks,
Tom

Jul 27, 2011 at 7:37 AM

Tom,

thanks for the quick response!  Yes the PDB's are in the GAC.  (in the .net 4 gac).

I checked the msi build log and there was no pdb for the assembly (SupportingAssemblies.PartyLookup.dll) in the log below. I've extracted (and redacted) a relevant bit of the log and appended it below.  As a workaround I made the original project produce a PDB.

 From the deployment.btdfproj:

<

PropertyGroup Condition="'$(Configuration)' == 'Release'" >

<

DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath >

<

OutputPath>bin\Release\</OutputPath >

<

DeployPDBsToGac>false</DeployPDBsToGac>

</

PropertyGroup >
 

 

 

  From the log on the deployment server:

       Target DeployComponents:
                Deploying components to GAC...
                "C:\Program Files (x86)\Purchase Orders Application\1.0\Deployment\Framework\DeployTools\gacutil.exe" /i "..\SupportingAssemblies.PartyLookup.dll"
                Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1
                Copyright (c) Microsoft Corporation.  All rights reserved.
                
                Assembly successfully added to the cache
                Finished deploying components to GAC.
                Deploying PDB's to GAC...
                Preparing to copy source file '..\SupportingAssemblies.PartyLookup.pdb' to GAC path 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\.SupportingAssemblies.PartyLookup\v4.0_1.0.0.0__6d244051a2d85ec6\.SupportingAssemblies.PartyLookup.pdb'.
                  Copying file from "..\.SupportingAssemblies.PartyLookup.pdb" to "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\.SupportingAssemblies.PartyLookup\v4.0_1.0.0.0__6d244051a2d85ec6\.SupportingAssemblies.PartyLookup.pdb".
                C:\Program Files (x86)\ Purchase Orders Application\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1336,5): error MSB3021: Unable to copy file "..\SupportingAssemblies.PartyLookup.pdb" to "C:\Windows\Microsoft.Net\assembly\GAC_MSIL\SupportingAssemblies.PartyLookup\v4.0_1.0.0.0__6d244051a2d85ec6\SupportingAssemblies.PartyLookup.pdb". Could not find file '..\SupportingAssemblies.PartyLookup.pdb'.
               Done building target "DeployComponents" in project "Deployment.btdfproj" -- FAILED.
        Done building target "DeployBizTalkMgmtDB_true" in project "Deployment.btdfproj" -- FAILED.
    Done building target "ServerDeploy" in project "Deployment.btdfproj" -- FAILED.
Done building target "Deploy" in project "Deployment.btdfproj" -- FAILED.

Done building project "Deployment.btdfproj" -- FAILED.

Build FAILED.
Coordinator
Jul 27, 2011 at 1:58 PM

Since you're looking at a server deployment here, you are dealing with '$(Configuration)' == 'Server' not 'Release'.  Perhaps you do not have <DeployPDBsToGac>false</DeployPDBsToGac> in the PropertyGroup associated with the 'Server' configuration?

Thanks,
Tom

Jul 27, 2011 at 2:12 PM

I was so focussed on Build and Release that I was overlooking  Server. However my config was 'Release' ; I've not tried to build a server release. I just took that Release kit over to the Server and now it works (with the pdb stuffed in).

<

Configuration Condition="'$(Configuration)' == ''">Release</Configuration>

 

 

<

PropertyGroup Condition="'$(Configuration)' == 'Server'" >

 

<DeploymentFrameworkTargetsPath>Framework\</DeploymentFrameworkTargetsPath >

<!--

Get our PDBs into the GAC so we get file/line number information in stack traces. -->  

 

</PropertyGroup>

<DeployPDBsToGac>true</DeployPDBsToGac>

Coordinator
Jul 27, 2011 at 3:06 PM

For a server deploy you'd build the MSI first, which is going to be either the Debug or Release configuration.  When you install the MSI on the server and run the deploy, the Server configuration will be in effect.  In other words, Debug and Release are only used on development machines.  When you say that you took the Release config to the server and deployed it, how did you deploy it?  Manually running MSBuild?

Thanks,
Tom

Jul 27, 2011 at 4:19 PM

Tom,

that explains it. As you can see from the config I posted a couple of replies back I do have the 'Server' Config left at true.

I copy the MSI over to the 'live' servers (not really live yet) and just install the MSI. I will try it again with the Server setting at false.

 

thanks

mark

 

Coordinator
Jul 29, 2011 at 4:19 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.