ClickOnce Publish Fails on Visual Studio 2010 Premium

Richard Arnold 181 Reputation points

I have a C# 4.0 WinForms application that I created using Visual Studio 2010 Premium SP1 on Windows 10.

Over a period of a year or more, I have modified and deployed this same App many times, using ClickOnce.
Visual Studio has always allowed me to successfully publish this app for deployment, until now.

The app contains one other project, a simple “SplashScreen” project, which I also have in references.
I recently made one small modification to the main code, which works successfully.

Please note, the application successfully builds and runs without any errors.
However, now, after attempting to publish, 2-separate errors are thrown, as listed below.

1) Cannot publish because a project failed to build.

2) An error occurred while signing: The parameter is incorrect.

My certificate has not expired, and both projects build.
The Output window reads as follows.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4539, 5): error MSB3482: An error occurred while signing: The parameter is incorrect.
Error: Cannot publish because a project failed to build.
=========Build: 2 succeeded or up-to-date, 0 failed, 0 skipped=========
=========Publish: 0 succeeded, 1 failed, 0 skipped=========
I have also tried to Build > Publish by using the menu in Solution Explorer, rather than from the Publish pane of VS.
Can anyone suggest how to correct this situation, as I am unable to publish my app any longer.

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,616 questions
{count} votes

Accepted answer
  1. Richard Arnold 181 Reputation points

    @Timon Yang-MSFT This is a follow up on the problem I experienced. Although I will continue to use Visual Studio 2019 Community, the issue did prove to be related to VS2010's Test Certificate using SHA1 instead of SHA2, and Microsoft no longer supporting SHA1. On a hunch, I changed the TimeStamp server from the following: to this: After compiling my application, VS did a successful Publish of this ClickOnce deployed app. For the audience still using Visual Studio 2010, this may help solve this same issue, if they experience it.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful