AutoUpdater.NET
AutoUpdater.NET copied to clipboard
ZipExtractor.EXE
When I made the installation package, I included ZipExtractor.exe in the installation package and set a code digital signature for it. After executing the update program and updating the file (the updated zip file does not contain ZipExtractor.exe), ZipExtractor.exe has been tampered with, the code digital signature is missing, and the modification date has also been changed. Why is this?
Because the tool bundles ZipExtractor.exe as a resource in AutoUpdater.NET.dll You need to re-build the DLL and inject your ZipExtractor.exe into it.
We are now encountering a problem. We now use the net6.0-windows framework for the AutoUpdater.NET project and the ZipExtractor project. We use release mode to build the project. There are ZipExtractor.deps.json, ZipExtractor.dll, ZipExtractor.exe, and ZipExtractor.runtimeconfig.json files in the net6.0-windows directory.
Then I added the ZipExtractor.exe resource in Resources.resx of the AutoUpdater.NET project.
I run the AutoUpdaterTest project and can download the zip file normally, but cannot decompress it.
Because nothing happens when running ZipExtractor.exe alone
@johnwanzhi You have to publish the ZipExtractor as shown here. You can see complete instructions here.
Thank you for your reply. If it is a .Net Framework framework, it is no problem to follow your construction method.
However, the net6.0-windows framework will generate a series of files, which is different from the .Net Framework framework. Because it only has one ZipExtractor.exe file
I've read the examples and instructions you provided at least five times, but none of them solved my problem. I don't know if I'm stupid.
As stated in the docs, "While compiling it for .NET Core 3.1 or above, you have to use publish command instead of build as shown here and copy the resulting executable to "AutoUpdater.NET/Resources" folder."
You can see in this line that it uses PublishSingleFile option in csproj so if you publish it then it will create a single EXE file. You can also use the command to do it. I used it in appveyor.yml here. Just replace the paths with the correct path and it should work for you too.
As stated in the docs, "While compiling it for .NET Core 3.1 or above, you have to use publish command instead of build as shown here and copy the resulting executable to "AutoUpdater.NET/Resources" folder."
You can see in this line that it uses PublishSingleFile option in csproj so if you publish it then it will create a single EXE file. You can also use the command to do it. I used it in appveyor.yml here. Just replace the paths with the correct path and it should work for you too.
very good! Following your tips I successfully published. More people should see this description