I've been building an application in C#. Whenever it's ready to publish I publish it with click once. I would then upload the files generated by click once to a github page, manually. Then my users could download the application from there.
But then I wanted to upload to github from the command line. In the publish directory I executed the following,
git add . git commit -m "Commit" -a git push origin main
Everything uploaded fine, but when my users go to install it the get an error, I've pasted the error down below. Can anyone tell me what this means and how to fix it?
PLATFORM VERSION INFO Windows : 10.0.22631.0 (Win32NT) Common Language Runtime : 4.0.30319.42000 System.Deployment.dll : 4.8.9176.0 built by: NET481REL1LAST_B clr.dll : 4.8.9181.0 built by: NET481REL1LAST_C dfdll.dll : 4.8.9176.0 built by: NET481REL1LAST_B dfshim.dll : 10.0.22621.30000 (WinBuild.160101.0800)
SOURCES Deployment url : file:///C:/Users/carson/AppData/Roaming/Microsoft/Windows/Start%20Menu/Programs/TextWiz/TextWiz.appref-ms%7C Server : GitHub.com Deployment Provider url : https://eco-sim.github.io/TextWiz.application Application url : https://eco-sim.github.io/Application%20Files/TextWiz_1_0_0_9/TextWiz.dll.manifest Server : GitHub.com
IDENTITIES Application Identity : TextWiz.exe, Version=1.0.0.9, Culture=neutral, PublicKeyToken=f0c5e0a64f440c26, processorArchitecture=msil, type=win32
ERROR SUMMARY Below is a summary of the errors, details of these errors are listed later in the log. * Activation of C:\Users\carson\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\TextWiz\TextWiz.appref-ms| resulted in exception. Following failure messages were detected: + File, TextWiz.deps.json, has a different computed hash than specified in manifest.
COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was detected.
WARNINGS There were no warnings during this operation.
OPERATION PROGRESS STATUS * [1/26/2024 2:47:07 PM] : Activation of C:\Users\carson\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\TextWiz\TextWiz.appref-ms| has started. * [1/26/2024 2:47:07 PM] : Performing necessary update check as specified by the deployment. * [1/26/2024 2:47:07 PM] : Consuming new update. * [1/26/2024 2:47:09 PM] : Installation of the application has started. * [1/26/2024 2:47:09 PM] : Processing of application manifest has successfully completed. * [1/26/2024 2:47:09 PM] : Found compatible runtime version 4.0.30319. * [1/26/2024 2:47:09 PM] : Request of trust and detection of platform is complete.
ERROR DETAILS Following errors were detected during this operation. * [1/26/2024 2:47:11 PM] System.Deployment.Application.InvalidDeploymentException (HashValidation) - File, TextWiz.deps.json, has a different computed hash than specified in manifest. - Source: System.Deployment - Stack trace: at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, Hash hash) at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, HashCollection hashCollection) at System.Deployment.Application.ComponentVerifier.VerifyComponents() at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options) at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp) at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc) at System.Deployment.Application.ApplicationActivator.ConsumeUpdatedDeployment(SubscriptionState& subState, ActivationDescription actDesc) at System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState& subState, String& errorPageUrl) at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
COMPONENT STORE TRANSACTION DETAILS No transaction information is available.
Answering my own question, when I did, "git add ." it converts LF to CRLF, meaning that the file it changes will no longer have the same hash as in the manifest. I had to disable that. If you are having the same problem search, "disable git from changing LF to CRLF", you will find a solution, as I did.