title: The "SignFile" task was not given a value for the required parameter "CertificateThumbprint"
body: <p>We have a line of business app which is deployed via clickonce. I can build and publish the application without any problems but when I try to use Continuous Integration (Build each check-in) I get the following error:</p>
  
  <blockquote>
  <pre><code> 2&gt;C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5):
  </code></pre>
    
    <p>error MSB4044: 
    The "SignFile" task was not given a value for the required parameter "CertificateThumbprint".</p>
    
    <p>[C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]</p>
    
    <p>Done executing task "SignFile" -- FAILED.</p>
  </blockquote>
  
  <p>We sign the application (to be more specific: the ClickOnce manifest) using a code signing certificate which is registered in the AD as Trusted Publisher. </p>
  
  <p>The Certificate is stored in Certificate store on my local workstation. The Certificate is also in the certificate store of the build server (1. In the Personal Store, 2. in the Personal store of the TFSBuildServiceHost Service Account and 3. in the Personal store of the tfs/build server itself).</p>
  
  <p>Where are using Visual Studio 2013 Update 4, C#, .Net 4.5 and TFS 2013 Update 4.</p>
  
  <p>I have no clue what causes this error, any help is appreciated.</p>
  
  <p><hr>
  <strong>EDIT:</strong></p>
  
  <p>I forgot to mention that the tfs build worked fine a few weeks ago. I didn't change a thing, i verified that the project file (Pulse.csproj) hasn't changed and i also had a few successful builds with that exact Pulse.csproj file / build definition. I'm pretty sure that it must be something on the tfs server. I remember that Microsoft had some trouble with some updates regarding the certificate infrastructure could it be related?   </p>
  
  <p><hr>
  <strong>EDIT 2:</strong>
  I tried to build the project via command line using this command:</p>
  
  <blockquote>
    <p>"C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe" C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln</p>
  </blockquote>
  
  <p>The build fails with the following message:</p>
  
  <blockquote>
    <p>CleanPublishFolder:   Removing directory "bin\Debug\app.publish\".
    _DeploymentComputeClickOnceManifestInfo:   Creating directory "bin\Debug\app.publish".<br>
    Copying file from "obj\Debug\Pulse.exe" to
    "bin\Debug\app.publish\Pulse.exe". C:\Program Files
    (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5):
    error MSB3482: An error occurred while signi ng: SignTool.exe not
    found. [C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]
    Done Building Project
    "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (default
    targets) -- FAILED.</p>
    
    <p>Done Building Project
    "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln" (default targets)
    -- FAILED.</p>
    
    <p>Build FAILED.</p>
    
    <p>"C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln" (default target)
    (1) -> "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj"
    (default target) (2) -> (_DeploymentComputeClickOnceManifestInfo
    target) ->   C:\Program Files
    (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5):
    error MSB3482: An error occurred while sig ning: SignTool.exe not
    found. [C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]</p>
  
  <pre><code>0 Warning(s)
  1 Error(s)
  </code></pre>
  </blockquote>
  
  <p>The Signtool definitely exists on the Server. The path to the signtool is: "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe" and "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" </p>
  
  <p>The most interesting part is that I CAN build the solution using a different msbuild tool.</p>
  
  <blockquote>
    <p>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
    C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln</p>
  </blockquote>
  
  <p><hr>
  <strong>EDIT 3:</strong></p>
  
  <p>I installed the  <a href="http://msdn.microsoft.com/de-de/windows/desktop/bg162891.aspx">Windows Software Development Kit (SDK) for Windows 8</a> and now I can build the solution via command line. Thus, the code signing certificate is installed &amp; available.</p>
  
  <p><em>But the TFS Build fails.</em></p>
  
  <p>Here is the error output gathered from the tfsbuild logfile:</p>
  
  <pre><code>      Task "AL"
           C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\AL.exe /culture:de /out:obj\Debug\de\Pulse.resources.dll /platform:AnyCPU /template:obj\Debug\Pulse.exe /embed:obj\Debug\Pulse.View.Localization.CreditsView.de.resources /embed:obj\Debug\Pulse.View.Localization.PulseMainWindow.de.resources
           Microsoft (R) Assembly Linker version 12.0.20806.33440
           Copyright (C) Microsoft Corporation. All rights reserved.
  
         Done executing task "AL".
       2&gt;Done building target "GenerateSatelliteAssemblies" in project "Pulse.csproj".
       2&gt;Target "CreateSatelliteAssemblies" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "CoreBuild" depends on it):
       2&gt;Done building target "CreateSatelliteAssemblies" in project "Pulse.csproj".
         Target "SetWin32ManifestProperties" skipped. Previously built successfully.
         Target "_DeploymentComputeNativeManifestInfo" skipped, due to false condition; ('$(GenerateClickOnceManifests)'!='true') was evaluated as ('true'!='true').
       2&gt;Target "CleanPublishFolder" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "_DeploymentComputeClickOnceManifestInfo" depends on it):
         Task "RemoveDir" skipped, due to false condition; ('$(PublishDir)'=='$(OutputPath)app.publish\' and Exists('$(PublishDir)')) was evaluated as ('bin\Debug\app.publish\'=='bin\Debug\app.publish\' and Exists('bin\Debug\app.publish\')).
       2&gt;Done building target "CleanPublishFolder" in project "Pulse.csproj".
         Target "_DeploymentGenerateTrustInfo" skipped, due to false condition; ('$(TargetZone)'!='') was evaluated as (''!='').
       2&gt;Target "_DeploymentComputeClickOnceManifestInfo" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "GenerateApplicationManifest" depends on it):
         Task "Copy"
           Creating directory "bin\Debug\app.publish".
           Copying file from "obj\Debug\Pulse.exe" to "bin\Debug\app.publish\Pulse.exe".
         Done executing task "Copy".
         Using "SignFile" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
         Task "SignFile"
       2&gt;C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5): error MSB4044: The "SignFile" task was not given a value for the required parameter "CertificateThumbprint". [C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]
         Done executing task "SignFile" -- FAILED.
       2&gt;Done building target "_DeploymentComputeClickOnceManifestInfo" in project "Pulse.csproj" -- FAILED.
       2&gt;Target "_CheckForCompileOutputs" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "_CleanGetCurrentAndPriorFileWrites" depends on it):
       2&gt;Done building target "_CheckForCompileOutputs" in project "Pulse.csproj".
         Target "_SGenCheckForOutputs" skipped, due to false condition; ('$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')) was evaluated as ('Off' == 'On' or (''!='' and 'Off' == 'Auto')).
       2&gt;Target "_CleanGetCurrentAndPriorFileWrites" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "_CleanRecordFileWrites" depends on it):
         Task "ReadLinesFromFile"
         Done executing task "ReadLinesFromFile".
         Task "ConvertToAbsolutePath"
         Done executing task "ConvertToAbsolutePath".
         Task "FindUnderPath"
           Comparison path is "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse".
         Done executing task "FindUnderPath".
         Task "FindUnderPath"
           Comparison path is "C:\Builds\1\Pulse\DefaultBuild\bin\".
         Done executing task "FindUnderPath".
         Task "FindUnderPath"
           Comparison path is "obj\Debug\".
         Done executing task "FindUnderPath".
         Task "RemoveDuplicates"
         Done executing task "RemoveDuplicates".
       2&gt;Done building target "_CleanGetCurrentAndPriorFileWrites" in project "Pulse.csproj".
       2&gt;Target "_CleanRecordFileWrites" in file "C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (target "CoreBuild" depends on it):
         Task "RemoveDuplicates"
         Done executing task "RemoveDuplicates".
         Task "MakeDir"
         Done executing task "MakeDir".
         Task "WriteLinesToFile"
         Done executing task "WriteLinesToFile".
       2&gt;Done building target "_CleanRecordFileWrites" in project "Pulse.csproj".
       2&gt;Done Building Project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (default targets) -- FAILED.
       1&gt;Done executing task "MSBuild" -- FAILED.
       1&gt;Done building target "Build" in project "Pulse.sln" -- FAILED.
       1&gt;Done Building Project "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln" (default targets) -- FAILED.
  
  Build FAILED.
  
         "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse.sln" (default target) (1) -&gt;
         "C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj" (default target) (2) -&gt;
         (_DeploymentComputeClickOnceManifestInfo target) -&gt; 
           C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5): error MSB4044: The "SignFile" task was not given a value for the required parameter "CertificateThumbprint". [C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]
  
      0 Warning(s)
      1 Error(s)
  </code></pre>
  
  <p><hr>
  <strong>EDIT 4:</strong></p>
  
  <p>Visual Studio 2013 is not installed on our build server. I've already been through the logfile and found that the TFS Build uses the MSBuild.exe stored in C:\Program Files (x86)\MSBuild\12.0\bin\amd64\ .</p>
  
  <p>Since I can build the project on the build server using the MSBuild.exe than TFS Build does I can be sure that the certificate itself is not an issue.</p>
  
  <p>I created a new build definition without modifying any of the settings but I still get the same error message.</p>
  
  <p>I also repaired the TFS Installation on the build server but no luck.</p>
  
  <p>I compared all *.targets files stored in the C:\Program Files (x86)\MSBuild\12.0\bin\amd64\ Folder on the Server with the *.targets files in the same location on my client machine. There 100% identical.</p>
  
  <p>Needless to say that I can build the project without any problems on my client machine (via VS2013 and command line). </p>
  
  <p>I deleted and re-registered/created the build service/controller/agent. The result is still the same.</p>
  
  <p><strong>I'm stuck here. Any ideas?</strong></p>