Hey,
I'm trying to get pre-3.0 behaviour of dotnet publish
without specifying runtime to build for, as I want to get a generic Program.dll
file to run with dotnet
utility.
Right now I'm getting framework-dependent executable in above place, which is alright in regards to the docs of changes.
My question is, how can I generate FDD again? My target use case is publishing that generic Program.dll
project to run in OS-independent environment, I don't want Program.exe
bundled there, because it's entirely useless for user running my Program.dll
e.g. on Linux, and vice-versa, publishing generic build on Linux has entirely useless ELF binary for Windows users.
Is there any way to tell dotnet
NOT to generate FDE during generic publish? I swear I went through all the docs, manuals and even internal documentation and I could not find a single mention of a switch that allows to do so, it feels like FDE is a direct replacement of FDD and not an option. I wish you can prove me wrong here, because FDE is completely inappropriate for my use case and FDD is everything that I need.
Thank you in advance for answering.
Your app will still work as a FDD app. You can still run dotnet program.dll
. The program.exe
that is in the output can simply be ignored.
The type of app that gets built has not been changed.
If you don't want the exe generated because you don't want to pay the file cost for it, you can turn that off by setting <UseAppHost>false</UseAppHost>
.
Your app will still work as a FDD app.
I know that, but I have no intention of generating exe at all if it's simply useless for my use case.
<UseAppHost>false</UseAppHost>
Thank you! 鉂わ笍
It took me over an hour of searching to find this issue. The https://docs.microsoft.com/en-us/dotnet/core/deploying/ documentation mentions "Framework-Dependent Deployments" as a possibility, but never actually explains how to publish as a "Framework-Dependent Deployment" using .NET Core 3.
Should the documentation be updated to reflect the need to use <UseAppHost>false</UseAppHost>
?
Most helpful comment
Your app will still work as a FDD app. You can still run
dotnet program.dll
. Theprogram.exe
that is in the output can simply be ignored.The type of app that gets built has not been changed.
If you don't want the exe generated because you don't want to pay the file cost for it, you can turn that off by setting
<UseAppHost>false</UseAppHost>
.