Hi CasperBrgesen,
Greetings for the day!
Thanks for taking time to explain the scenario and we are glad to help you!
I have few suggestion for trying the workaround in your case.
- You have mentioned that the BAT file calls the external source when you run it from the WPF application locally and the error
received only when you publish the files. Can you try if there are any missing entries in the publish folder? - I hope WPF is a form based application and you can run the exe from the release or debug folder. Just to confirm there are no
issues with the release package, try running the exe from release folder. If it works you can try deploying the same manually to
the publish folder. - If step 2 works, then the issue is with only during the click one deployment. Below link will provide additional details incase
you would like to analyze this. https://learn.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-using-clickonce-folder?view=vs-2022
https://learn.microsoft.com/en-us/visualstudio/deployment/building-clickonce-applications-from-the-command-line? view=vs-2022
view=vs-2022
- Try to find additional information about the error. In case the logs from application doesn't help much, try verifying the
eventlogs. To verify event logs, please follow below steps.
Type "eventvwr" in run
Open Event Viewer.
In the console tree, expand Windows Logs, and then click Security. The results pane lists individual security events. https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/view-the-security-event-log 5 - Final option would be resolving the third party code. At some point you must find the code base to get rid of the risk.
Its not suggestable to remove the Windows updates as the your development code works fine. Also you can verify if there are any know issues related to what you have mentioned in below link.
https://learn.microsoft.com/en-us/windows/release-health/resolved-issues-windows-10-20h2
Feel free to get back if you have any questions.
-----------------------------------------------------------------------------------------------------------------------------------
--If the reply was helpful, please don’t forget to upvote or accept as answer--