Avalonia: .NET Core

Created on 10 Nov 2015  ·  29Comments  ·  Source: AvaloniaUI/Avalonia

Will Perspex be supported on .NET Core? We need a good GUI framework for .NET Core that will work cross-platform. This looks like it would be a good WPF replacement for that use case.

Most helpful comment

875

All 29 comments

Yes, we fully intend to get Perspex working with .NET core, but we're waiting for the final release; in particular the .NET Standard Platform will make targetting the diverse platforms _so_ much easier!

I can't really wait to see .NET Core XAML apps running in Raspberry Pi 2

Me too. I hope the project is making progress in this direction.

I think our main blocker will be that fact that according to this it appears that Rx isn't yet working on .NET core.

So we are waiting till the chain of dependencies start supporting .NET Core.
I'm sure that will happen soon :+1:

This is great!

Well, with Core at 1.0 and that issue closed resolved, @grokys do you think work can start on this? I'd love to be able to use this with core. :)

Yes, it would be nice to try it out - please, give it a go!

Yes, it would be nice to try it out - please, give it a go!

Sorry, I guess I wasn't clear. I won't be able to port it now (have my own project I have to work on atm). :/ but best of luck to whoever tries it. :)

I was more asking if there were any other blockers to porting.

Ah sorry, I thought you were wanting to do it. I'm not going to do it myself right now, as there's a lot to do on the base and I want to wait for the .csproj support as that will make it easier to port, I think. But if anyone else wants to give it a try, I'm all for it!

If the move to csproj is a blocker for you, do note that you can target .NET Core with MSBuild right now, it's just a little less "pretty" than it will be in the future. We have a document here describing the process. If anyone is interested in pursuing that route. I'd be more than willing to help out with getting the build projects set up correctly. Most of my own personal projects use MSBuild with .NET Core, so I'm fairly familiar with how it all works.

@mellinoe oh that is indeed interesting! I probably won't have time for the next few weeks, but someone else may well wish to try it.

Ill give it a shot.

I've just had a quick go at converting our PCLs to .NET Standard and encountered the following problems:

  • 'EmbeddedResource' doesn't seem to be supported
  • Splat doesn't have .net standard version
  • JetBrains.Annotations doesn't have .net standard version

You should be able to "import" the PCL platforms. I know on project.json projects it looks something like:

"frameworks": {
"netstandard1.6": {
"imports": "portable-net45+win8+dnxcore50"
}
}

I'm not sure how that translates to the csproj format though.

Thanks @ScorchedHands - I will try that! I'm using project.json for the moment as the .csproj stuff is still in development.

Here is the PR btw: https://github.com/AvaloniaUI/Avalonia/pull/620

@ScorchedHands that seems to have allowed me to import the splat nupkg but now I'm getting errors like:

Error   CS0518  Predefined type 'System.Boolean' is not defined or imported

Any idea what the correct fix to that is? I've looked around but can't find anything definite.

@grokys I think it has to do with the monikers you chose. Perhaps reading through this blog post will help a little?

@ethanhs that post is very useful in general, thanks! However I can't see anywhere it addresses the issue I'm seeing.

It doesn't specifically, I should have been more clear. Since it isn't importing the correct types, I believe you are missing a reference to eg dnxcore50. I am going to poke at this, just checked out your pr.

I think @ethanhs is correct and you're not importing quite the correct types. Though instead of dnxcore50 you probably have to import net451 since the "unsupported" packages are probably based on the full framework. This is overall the trickiest part of bridging the .net framework with .net core.

OmniXAML v2 will support .NET Core!

For anyone interested in this, I rebased the PR I put up (#622) and was able to get the XamlTestApplication project to run on CoreCLR on Windows without any bugs (that I noticed :smile:). The PR isn't at a mergeable state yet (quite a bit of messiness left since I hacked through some stuff), but the idea is there.

Any news on this?

@feliwir not yet - I'm currently rewriting our renderer so it doesn't draw the whole window on every frame. I personally won't be looking into .net core until I've finished that.

I know @curea is currently having a go.

Any updates? Id really like something to start building out some cross platform app and framework s

875

.net core support is now merged #875

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JonathaN7Shepard picture JonathaN7Shepard  ·  4Comments

stdcall picture stdcall  ·  4Comments

TheColonel2688 picture TheColonel2688  ·  3Comments

danwalmsley picture danwalmsley  ·  4Comments

akunchev picture akunchev  ·  3Comments