SignTool Error: An unexpected internal error has occurred. error MSB3482 - deployment

SignTool Error: An unexpected internal error has occurred. error MSB3482
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(3975,5): error MSB3482: An error occurred while signing: Failed to sign bin\Debug\app.publish\Halmanac.exe. SignTool Error: An unexpected internal error has occurred.
The error is the clickonce publish process for a winforms application in C# with clickonce deployment using a Code Signing Certificate from GoDaddy. The Certificate is good and current - expires 09-22-2020. If I remove the certificate (uncheck code signing), the error goes away and I can publish the exe. I want the certificate to prevent installation problems.
The application has been running for many years with minor changes each year. When I got the error, I restored a 6 months old copy that had been deployed with the certificate and I got the same error. Therefore, something has changed on the computer. I am running a current version of Windows 10.
How do I troubleshot this problem?
What do you recommend I do?

I don't know if this is your case, but in my case I was getting this error on an old project that I have not updated since 2019, I need to do some fixes and publish again. And this error shows with no changes to the project files (only code).
After reading this:
SignerSign() failed. (-2146869243/0x80096005)
Because of other Error with the exe sign, I revisited the code sign setting page and see that was using the timestamp server with the URL:
http://timestamp.comodoca.com/?td=sha256
I removed the /?td=256 part leaving it like:
http://timestamp.comodoca.com
And now the project compiles with no problem

I wanted to provide an answer to my own question. After a lot of research into all kinds of possible causes. I did use the signtool to sign the EXE manually. This atleast proved the signtool and CSC were working. In my last step, I looked at the compile parameters for 32bit and 64bit output exes. The software is one EXE and 2 DLLs. I made sure to examine every parameter involved in making the EXE. After a number of changes/fixes/tweaking, the software published a Clickonce EXE. I installed the EXE from the Internet and everything worked. I do not know what fixed the problem, but the error is gone. In my opinion, there was a conflict in parameters between the EXE and DLLs. Robert Neal 07-15-2020

Related

esp-idf build fails with "fatal error: esp_wifi.h: No such file or directory"

I am a student who has gotten a part time job embedded system programming. I am given a program the company uses, and asked to understand it. This is a working program. Therefore, the project can be built and flashed on ESP32 by the developers with no problem. So, the code and CMake files should have no issues. However, I cannot build the program either with VSCode extension nor with idf.py. In fact, I cannot build esp-idf examples from the official website, either.
Note: I am new to StackOverflow as well as to ESP32, so sorry if I made any mistakes here. If this post is problematic in any way, please inform me.
The error message from the terminal is shown here
I was initially using VSCode on Windows 10 (Windows is not activated). At first, ESP extension was completely failing to start the building process because it could not locate the tools. I was getting "could not be located" errors for all the tools. Below is a list of what I did in this setting:
I had v5.0.0 for esp-idf downloaded from Espressif server. I deleted it and tried v4.3.3 and then I tried to download from Github server. I downloaded the requirements for idf.py scripting environment and completed the settings for it as described by the Espressif's documentation.
I manually set the environment variables for IDF_PATH and PATH for both the user and for the system.
After 2, the initial error was gone. Unfortunately, I had a new error which indicated that ".elf" file for the project output could not be found. I do not exactly recall the error but if it is integral to the problem's solution I can try to replicate this issue.
I tried to delete and reinstall VSCode. I tried running VSCode with admin authority.
I tried changing the IDF_TOOLS_PATH in the VSCode esp-idf extension configurations from ".espressif" to "esp\esp-idf".
At this point, I moved to try to build the project on Ubuntu 22.04.1 LTS:
In Ubuntu, I got the fatal error: esp_event.h: No such file or directory error.
It does not seem to be a common issue and I could not find much about it online.
I followed the Linux setup steps in the documentation. It said that only step 1 (Downloading the prerequisites) was necessary for the VSCode extension.
I decided to try the "master branch" from esp-idf configurations as well. After I downloaded the master branch, the error changed to the current version: 'fatal error: esp_wifi.h: No such file or directory'
I also tried the idf.py in Ubuntu but I got the same error.
Both in Ubuntu and in Windows, the Doctor Command returns nothing. It does not even open the terminal or any window. I am not sure what it should return but some online discussions were asking about its return so I wanted to note it here.
Edit: When I tried the examples on Ubuntu, they actually build just fine. Doctor Command also works with examples.
However, the main code has still issues. Initially, I assumed I made some mistakes with esp-idf configurations. But, perhaps that was not the case.
I had the same problem and ended up editing my project's CMakeLists.txt. When I added "esp_wifi" to the "REQUIRES" list, it worked for me:
idf_component_register(
SRCS "main.c"
INCLUDE_DIRS res
EMBED_FILES res/settings.html
REQUIRES esp_wifi
)

Build Visual Studio project fails - The cloud operation was unsuccessful

I'm using two laptops and stored my C# code in OneDrive.
I am aware that sharing code via OneDrive is not be the best approach, but that's what I'm dealing with now.
I noticed that on laptop 1 I have to define the following path to the data file (mdf):
C:\Users\ Diet\OneDrive\Personal\VisualStudio2019\Repos\project\project\App_Data\data.mdf
On laptop 2, the path is different because the user I'm logged in with has a different name (or at least that's what I believe is the cause)
C:\Users\ Dieter\OneDrive\Personal\VisualStudio2019\Repos\project\project\App_Data\data.mdf
Updating this in the Web.config fixed the connection to the database, BUT building the solution still returns an error, also related to a cloud operation, hence why I think it is caused by the path in OneDrive...
The error message:
CSC : error CS0041: Unexpected error writing debug information -- 'The cloud operation was unsuccessful.
I welcome your insights. Thank you for helping me out.
I have my projects stored in OneDrive and had this same issue. The fix was to set the entire Project folder contents to "Always keep on this device".
Seems that building the solution in VS was attempting to write to files that were not cached locally from OneDrive. As soon as I changed the setting, the build worked!
I was also storing my project on OneDrive, got the same error after installing a new ssd.
Rebuilding the solution was enough for me.

BlobAccessDenied with Application packages

I have been having an issue with application packages where there will be days/times where I just get a null exit code and BlobAccessDenied Error for the exact same application package and exact same command line that previously worked and gave a non-null exit code. For instance, today, I've been getting this error for the exact same packages and commands that I ran yesterday. What am I missing? Or is this a bug in the application packages service? (for VM configuration)
Update:
This fix is been released and deployed, this error will no longer exist for the specified case.
Also something I wrote in an hour jsut to test and might come handy apart from good dotnet samples :
https://github.com/Tatsinnit/quick_sample_batchapppkgworking
https://github.com/Azure/azure-batch-samples
Thanks j.B. & Jan

Parser Error or Server Error in "/" Application and Error in Web Config

Hi I've been encountering an error in my project. I need to see the changes that I made in my codes but when I run/debug my project there's an error.
Server Error in "/" Application or Parser Error and Error in Web Config
I couldn't know the exact reason why I have this kind of error.
I got my project in Visual Source Safe, I copied it in my local so I also compare the codes or the project that I got from the VSS but the codes are just the same. My colleague also try to run the project in his computer and it's okay. So what could be the problem?
Your actual error is the red line, which shows you don't have the AjaxControlToolkit added to your project. There are a number of solutions in the SO Q Could not load file or assembly 'AjaxControlToolkit' after upgrade to .net 4.0 which could assist you as this is likely not VSS related.

"Last Build Status: Failed" after uploading a build for analysis

We use Coverity's free scanning service for free and open source projects. We have not been able to utilize the service for the last two months or so. Prior to the service failures, we had half-a-dozen or so good analysis.
Submitting a scan results in:
Last Build Status: Failed. Your build has failed due to the following reason. Please fix the error and upload the build again.
Error details: :Failed to retrieve tar file
Coverity is very good about providing copy/paste directions, and we have copied/pasted them religiously. We verified there are no build errors, and we verified the build ends with "131 C/C++ compilation units (100%) are ready for analysis" and "The cov-build utility completed successfully".
We've tried to resolve the issue by verifying things from this generic solution provided in a "failed email" response from the service. We verified or performed all of them except number four.
We did not perform number four because Coverity's documentation is horrible (its the exact opposite of their awesome scanning service). Because there's no instructions or RTFM to read, we have no idea which knobs should be turned for bin/cov-configure. We don't want to mess with it since it worked in the past.
We also tried the following:
using the web submission form and browser
using curl from the command line
packaging cov-int/ in a tarball
packaging cov-int/ in a zip file
using all lowercase for the project name
capitalizing the first letter of the project name
We always get the same message ("Failed to retrieve tar file"), even with a ZIP file. Recall that prior to about 6 weeks ago, everything was working fine.
What is the secret to uploading a file to the service? What has changed in the last six weeks or two months?
After contacting the coverity support we just received the following answer and we could successfully submit a build. Seems there was some hickup on the coverity side.
"This was due to some behind the
scenes issues on our end – nothing interesting,, but it is back up and
running now. Thanks for your patience".