.NET 6 WinForms PublishSingleFile w/merging support?
SamanthaJ
Posts: 7 Bronze 1
.NET 6 greatly improves the single file support over what .NET Core 3 offered.
When using dotnet publish -p:PublishSingleFile=true
as described here: https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file/overview
I am able to get a single file exe.
Our main app dll is merged with our satellite dll's and protected properly, and used in the single file exe.
However, our satellite dll's are also packaged in the exe in unprotected forum.
Is there a way to fix this or plans to resolve this in the future?
Deploying a single .exe for us is greatly preferred over deploying an .exe, .dll, and two .json's
When using dotnet publish -p:PublishSingleFile=true
as described here: https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file/overview
I am able to get a single file exe.
Our main app dll is merged with our satellite dll's and protected properly, and used in the single file exe.
However, our satellite dll's are also packaged in the exe in unprotected forum.
Is there a way to fix this or plans to resolve this in the future?
Deploying a single .exe for us is greatly preferred over deploying an .exe, .dll, and two .json's
Tagged:
Answers
I don't believe Smart Assembly's support of single file executables has changed since .NET Core 3, however I think what you're describing was covered by that also.
Does this guide differ from your present workflow please?
https://documentation.red-gate.com/sa/building-your-assembly/using-smartassembly-with-single-file-executables-net-core-3
In .NET 3, the exe is really a self extracting file that extracts the contents (dll's, etc..) to a temporary folder and runs it from there.
In .NET 6, it is a truly bundled and self contained file.
We have found a "temporary" solution to deploy SmartAssembly protected .NET 6, single file exe's.
Thank you for explaining, is it a temporary solution due to how manual it is and a smoother workflow would be prefered? (perfectly reasonable) or is there some missing functionality please?
The problem right now is that if the consumer of your product isn't super careful and tries to publish a single file exe, the unprotected assemblies will be embedded into the final product along side the properly protected assembly.
Furthermore, if your users don't know how to use ilspy, and other various tools to validate their results, they could be publishing unprotected source unknowingly.
We'll retain the feature request however for future use, I'm sorry we don't have a better answer for you.