views:

177

answers:

1

I'm working on ironing out some problems with MSBuild on a large project. As part of a custom build target in our MSBuild setup we insert the .PDB files into Symbol Storeafter the build is successful. This works fine. However when we delete the old builds we also have to delete the .PDB files from Symbol Store, which requires a transaction ID that's generated when the symbols are inserted. This is output in the build debug file so not a problem to find. The problem is that we want to automate the deletion of old builds, and we need to also delete the .PDB files at the same time. Currently this can only be manually, and before deleting the build by hand as well, otherwise we lose the transaction ID. Is there a way of hooking into the automated delete process in MSBuild and putting some custom targets in?

+1  A: 

I'm working on ironing out some problems with MSBuild on a large project. As part of a custom build target in our MSBuild setup we insert the .PDB files into Symbol Storeafter the build is successful.

Kudos for using a Symbol Server. I will never regret for using it.

For your special case I would consider writing a custom MSBuild task and hooking that task into the MSBuild script.

Writing a task is very simple and you can just call it from the project file very easily:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    <UsingTask TaskName="SimpleTask3.SimpleTask3" 
        AssemblyFile="SimpleTask3\bin\debug\simpletask3.dll"/>

    <Target Name="MyTarget">
        <SimpleTask3 MyProperty="Hello!"/>
    </Target>
</Project>
smink