❔ developing wpf on linux using jetbrains rider
hello everyone 🙂 noob here
trying to follow along with the examples in this book i'm reading(head first c#) it has steps on how to change the xaml for a windows desktop app using wpf option in vs code. but i'm on jetbrains rider on linux is this no possible?
i tried doing settings -> file templates -> xaml -> resource dictionary using the instructions in this page: https://www.jetbrains.com/help/rider/Settings_Tools_XAML_Preview.html
and then hitting on save but i don't know if it worked, coz when i do a 'new solution' it doesn't have the option for wpf forms. or is just a file it's creating? coz i also can't find it
JetBrains Rider Help
XAML Preview | JetBrains Rider
29 Replies
WPF is not cross platform. WPF is only supported on Windows. You can write code for it from linux, but you won't be able to run it on linux.
as for what features are in JetBrains Rider... sorry can't help with that. I don't use Rider. Hopefully someone else will chime in
The WPF option should be under "Desktop Application" on the ".NET / .NET Core" category (not .NET Framework)
I don't know it it displays on linux tho
ty for all the insight guys
i don't mind, i'm sure i can run the actual binary with wine or something but the solution template to start from is what i need, as you say i can write it probably, and as long as it compiles getting it to run should be easy enough
yeah you have way more options there mine is like this
did you have to do something to get those options?
hmm, what dotnet versions do you have installed? (You can head over to Console application to check under Framework or SDK
under core the highest available it says is 7.0 and under framework it says 4.8
hmm, maybe we can init it via the cli then just open it in rider?
how do you do that?
do you get an error when creating a project in
dotnet new wpf
(remember to change to a respective working directory (like /home/pum/RiderProjects/head_first_c-sharp/))
dotnet new sln
dotnet sln add head_first_c-sharp.csproj
wait i might have done the last two commands you sent wrong
from where am i supposed to run it?
check this out though
yea, i just tested the same in wsl and got that same error, it looks like wpf isnt included as a template on linux
can i download it maybe?
install it somehow?
doesnt look like it, tho alternatives to wpf can be Avalonia (which is similar but not exactly xaml code)
dammit microsoft
ty though
what i could find on the topic:
people were having similar issues, and no luck
interesting
welp
Just use Avalonia
It's basically WPF 2.0, and fully x-plat
regarding this
$ dotnet new slnYou can delete that now it should be something like
The template "Solution File" was created successfully.
head_first_c-sharp.sln
also has Avalonia specific support (https://docs.avaloniaui.net/docs/next/get-started/set-up-an-editor#jetbrains-rider)Was coming here to say just that, glad somebody said it xD
I'm pretty sure Wine can't run WPF
Wine could run WPF for years.
I have end users that have been for a good 3 years.
I do suggest just using Avalonia though
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.