❔ How to build ConsoleApp to Linux?
Hello I know there's a way to do it, but I dont know how.
I actually working on windows(10) and using the net6.0 and publishing my consoleApp(c#) with ClickOnce, but it gives me only a
.exe
file.
Please help 20 Replies
Don't use clickonce
Where are you publishing the app to?
Afaik if you build a .net app on linux, it doesn't matter if you get an . exe
You can still run it
When I build my avalonia UI app on linux, I also get an .exe
But that exe won't run on Linux
And ClickOnce itself is, IIRC, something Windows-specific
So the solution is to build with a specific runtime flag
Either through the CLI,
dotnet publish --runtime linux-x64
or some such
Or through the IDE's publish wizard thingPc
my friend told me, a linux server needs a emulator or something like this to run this
Can I ask where specifically I need t o put it?
No need for an emulator
The command I posted is a command line command
Do you use Visual Studio?
yes
everything I understand, but i dont know, where put this command
i know, thats dumb, sorry for that 😅
but i never used a console before
Deploy .NET Core apps with Visual Studio - .NET
Learn to deploy a .NET Core app with Visual Studio.
No need to use the console
VS has the publish wizard or whatever it's called
everything is okay, but i dont know to to get to the publish wizard
Uh, file -> publish?
oh
Just guessing, been a while since I used VS
If it's not there, I'll need a minute to run it and see where the option is lol
np, i have public selection
thats it, yeah?
¯\_(ツ)_/¯
Not sure what "public selection" is
*publish
$publishgif
❤️
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.