The “SignFile” task was not given a value for the required parameter “CertificateThumbprint”

别等时光非礼了梦想. 提交于 2019-12-01 16:37:12

Note: If you are looking for a quick fix and it is okay for your project to not be signed then you can do this. I encounter this problem when I am looking for a sample code, and using this quick fix solves my problem instantly.

  1. Go to the project properties
  2. Select signing options
  3. Uncheck the `Sign the ClickOnce manifests
  4. Save
  5. Re-run it
  6. (Optional) In some cases you need to rebuild it.

If it doesnt work please try to uncheck the enable ClickOnce security settings which can be located on Security tab.

This is how I solved the problem:

Our build services was configured to run as NT AUTHORITY\NetworkService I simply changed this to my own user account. Note that I already had the *.pfx file installed to personal certificate store.

I guess the problem was that the user NT AUTHORITY\NetworkService does not have the required certificate in the certificate store. I still have no idea how to add certificates into the personal store of system accounts. Nevertheless my problem is gone for now although I don't like the fact that the build service runs with my credentials.

try to add the certificate in the signing tab of the project properties by selecting "Select from store"

or

try clicking "Create Test Certificate"...

Another reason why you might be getting this is if the certificate thumbprint has changed (i.e. when it has been renewed because the old certificate has expired), and you no longer have the old certificate installed. This happened to me just now.

Solution: open up the project in Visual Studio, go to the Signing Tab, click Select from Store and make sure that the correct (new) certificate is installed. This solved the problem for me.

For those come across this issue using CI with an EV Code Signing Certificate. EV Code Signing Certificates use a dongle or thumb drive, so you must have a build server on premise and update your project file manually.

  1. In VS, Right click on your project and Unload it.
  2. Right click and Edit the csproj file.
  3. Find or add this entry
    <PropertyGroup> <ManifestCertificateThumbprint>**Your Certificate Thumbprint Here**</ManifestCertificateThumbprint> </PropertyGroup>
  4. Copy and paste the thumbprint of the certificate from your build server into the ManifestCertificateThumprint value.
  5. Reload your project and check in.

when i had this issue i edited the .csproj file using a text editor.

i remove the "ManifestCertificateThumbprint", "ManifestKeyFile" , "GenerateManifests" and

"SignManifests" propertyGroup.

Goodluck!!

I had the same issue. I sorted it out in rather weird way. I went to the project properties then selected 'Signing' option. Under it I unchecked the Sign the ClickOnce manifests and also unchecked the Sign the assembly option. The project ran afterwards.

This is a dangerous solution and is not offered as a permanent solution.In my case I used it only because I was working on a local copy and needed to do some fixes so I just needed to get the project to run. In a real world deployment scenario do not do this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!