Signing assemblies with PFX files in MSBuild, Team Build, and TFS

后端 未结 6 946
抹茶落季
抹茶落季 2020-12-30 01:12

I get this error when trying to build a project using Team Build (MSBuild) on TFS 2010:


C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\Micro

相关标签:
6条回答
  • 2020-12-30 01:28

    What finally fixed it for me was making the account under which TFS Build service runs an administrator on the local machine.

    Don't know though if any of the other stuff I was trying before also needs to be done to get it working. But before it was admin it didn't work after it became admin it worked.

    0 讨论(0)
  • 2020-12-30 01:31

    I have faced similar issue

    Scenario 1: While building project in local system

    In my case i was getting the manifest signing error once i download the project from TFS and build it.

    To avoid this issue I right clicked on the project ==> Properties ==> Signing then unchecked "Sign the ClickOnce Manifests"

    OR

    You can click Select from store button and select your login id from the dialog box open.

    OR

    You can install the PFX file manually and later click on More Options button to install those certificate.

    Scenario 2:- Manifest error during Build

    Here to resolve this error i first clicked Select from store button and select my login id from the dialog box .Then I committed that project in TFS first and then run the build.

    0 讨论(0)
  • 2020-12-30 01:32

    You need to adapt this answer to your specific. Something like:

    sn -i companyname.pfx VS_KEY_C00C673BBB353901
    
    0 讨论(0)
  • 2020-12-30 01:35

    I was getting the same error, and after reading your "administrator" comment - I just ran VS Command Prompt as Admin and it now works fine.

    0 讨论(0)
  • 2020-12-30 01:45

    I had following settings:

    <PropertyGroup>
      <SignAssembly>false</SignAssembly>
      <AssemblyOriginatorKeyFile>MyKey.pfx</AssemblyOriginatorKeyFile>
    </PropertyGroup>
    

    Assembly signing was turned off, but AssemblyOriginatorKeyFile caused error during manifest sign. Removed AssemblyOriginatorKeyFile to fix it.

    0 讨论(0)
  • 2020-12-30 01:53

    What I did is not that elegant, but works: log in as the user that runs msbuild on the build machine, manually invoke msbuild, and then type in the password when prompted. It'll now be saved in that user's certificate store, and now the builds can run unattended.

    0 讨论(0)
提交回复
热议问题