Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net Core 3.0 #4

Closed
virzak opened this issue Nov 2, 2018 · 18 comments
Closed

.Net Core 3.0 #4

virzak opened this issue Nov 2, 2018 · 18 comments

Comments

@virzak
Copy link

virzak commented Nov 2, 2018

Any plans to target multiple frameworks including the upcoming .Net Core 3.0?

@Dirkster99
Copy link
Owner

I have no such plans right now since WPF seems to not go anywhere but WIndows Desktop :-( ...but I don't mind looking into it - would you be able to point me into a general direction? I find all the available frameworks and runtimes confusing and thought there is no way for WPF UI controls to support more than desktop(?).

What is the point to support .Net Core 3.0? Would this enable using the same control on Desktop and UWP or is there a different advantage here?

I guess it all boils down to this question:
Which frameworks would you want to see targeted and what would be the advantage?

@Dirkster99
Copy link
Owner

Hi virzak,

since you brought up the question would you be able to give me some background information (a link or short explaination) towards using .Net Core in this project?

Thanks Dirk

@virzak
Copy link
Author

virzak commented Nov 9, 2018

Hi Dirk,

That's all very new to everyone. I'll see if I can do a pull request over the weekend, but to summarize, it seems that Microsoft implements all its new APIs into .NET Core, which won't be immediately available in .NET framework. There are daily builds at https://github.com/dotnet/core/blob/master/daily-builds.md

You can run dotnet new wpf to create a .net core wpf application.

I'll see if I can make a pull request over the weekend.

@Dirkster99
Copy link
Owner

Hi Virzak,

that sounds great - I've found this blog entry on the subject:
https://blogs.msdn.microsoft.com/dotnet/2018/05/07/net-core-3-and-support-for-windows-desktop-applications/

Sounds very exciting to me - so far, I have had little to no exposure to dotnet, but would not mind changing that - I look forward to your pull request to see if this change is really as easy as described in the blog,

Thanks Dirk

@virzak
Copy link
Author

virzak commented Nov 18, 2018

Looks like before any pull requests, multitargeting needs to be available. Other than that the project converts easily, but having 2 different projects is probably not desirable.

@Dirkster99
Copy link
Owner

OK. I'll have a look at the linked article - it describes how this can be targeted to NetCore 3.0, right? I'll see if I can do it and get back to you when I am done or when there are questions comming up...

@Dirkster99
Copy link
Owner

I was able to convert this but the application hangs on start-up for me - did you get it started and working with NetCore 3.0?

I installed these 2:

and converted the project using the command line only, which got me to this:
InPlaceEditTextBoxLib.zip
InPlaceEditTextBoxLib_Output.txt

See *Output.txt for the output I got on compile - so its compiling with 10 warnings but hangs for an eternity until I can actually kill it never mind getting it to run - did you get it to run?

Do you happen to know when multitargeting should be available?

@Dirkster99
Copy link
Owner

Dirkster99 commented Jan 18, 2019

I found the problem of the application not starting up - it seems like the timing is completely different now which is why I had to edit the code in line 93 from:
Application.Current.Dispatcher.Invoke(() => { base.Clear(); }, _ChildrenEditPrio);
Master - Solution/SolutionLib/ViewModels/Collections/SortableObservableDictionaryCollection.cs

into
base.Clear();
NetCoreMultiTargeting - Solution/SolutionLib/ViewModels/Collections/SortableObservableDictionaryCollection.cs

The application starts-up now but is looking really strange (I've never seen such a strange Generic theme before).

I am using a 4K display maybe thats why the Scrollbar is looking so strange in comparison to the rest of the window? But it seems like there are also other things missing (the treeview is empty) maybe thats a reource problem again?

untitled
untitled_1

@virzak
Copy link
Author

virzak commented Jan 18, 2019

I have tried to convert it as well and I have a working version with .net framework, but a similar issue with .net core. That's why I haven't made a PR yet. Is this happening with .net framework or core?

@Dirkster99
Copy link
Owner

I compiled it with "dotnet build" so its happening with .net core - its probably best to install a later daily build and check back to see if it disappears at some point...

@virzak
Copy link
Author

virzak commented Jan 20, 2019

dotnet run --framework net461 works perfectly for me.
dotnet run --framework netcoreapp3.0 throws

Exception Info: System.TypeInitializationException: The type initializer for 'SolutionLib.ViewModels.Browser.Base.ItemChildrenViewModel' threw an exception. ---> System.InvalidOperationException: Cannot perform this operation while dispatcher processing is suspended.

I believe this is the same issue you're having. And it doesn't seem like anything is wrong with the InplaceEditBoxLib. If you'd like I can make a PR, but seems like you're at the exact same place as I am.

@Dirkster99
Copy link
Owner

yes, we are looking at the same problem, which is more likely than not, the fact that .Net Core 3.0 is not final, yet. I guess, the best we can do is come back to this from time to time since filling a bug is to early, right?

@virzak
Copy link
Author

virzak commented Jan 20, 2019

Sure. At the same time, since the issue is outside of the library, perhaps it is ready for nuget pre-release?

@Dirkster99
Copy link
Owner

untitled
done

@virzak
Copy link
Author

virzak commented Jan 22, 2019

Great, thanks so much!!!

@Dirkster99
Copy link
Owner

Hi Victor,

I worked a little bit more on the NetCore branch with VS 2019 Preview and .NetCore3 Preview 8 today and got the application to load its data as before again. But the EditBox control still does not seem to work - the images below can be re-produced when everything thats's EditBox in MainWindow.xaml is commented out and the TextBlock tag is instead commented in.

You can clearly see that the EditBox control is missing. I searched for quit a while now but cannot find a problem and so I am wondering if this should be reported to the .NetCore project or whether I am overseeing something - what do you think?

The TreeView with TextBlock activated:
TextBlock

The TreeView with EditBox activated:
EditInPlaceTextBox

@Dirkster99
Copy link
Owner

I simply ported the control project one more time with VS 2019 Preview and NetCore 3 Proeview 8 and got it now working as it should :-) result will be available in nuget/release 1.4.

@virzak
Copy link
Author

virzak commented Sep 3, 2019

Awesome, glad it worked. Sorry I wasn't able to get to this in time. It is a labor day weekend here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants