Issue with Net 5.0
Moderator: Ras
-
- Posts: 313
- Joined: Tue Aug 03, 2021 2:41 pm
- Full name: Bill Beame
Issue with Net 5.0
Okay, I see the advantage of bit boards, at least on pseudo move generation; however, Net 3.0 doesn't support bit scan forward. So, I took the advice of some on this board and target Net 5.0. I got the intrinsic bit operations working and it runs 9.9x faster than my code work around. The problem is Net 5.0 doesn't update my labels and the WPF doesn't support some of my Win forms code. I need the speed, but, I also need my graphics and forms code. Am I missing an assembly or namespace? It seems like 100s of other programmers are having the same issue with Net 5.0. Does Net 6.0 have better support for Win Forms?
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: Issue with Net 5.0
Again for Chessnut: Bitscanforward (ie TrailingZeroCount) could be used since Visual Studio 2015 and .net framework. For Core its also there:
System.Runtime.Intrinsics.X86.Bmi1.X64.TrailingZeroCount(value);
System.Runtime.Intrinsics.X86.Bmi1.X64.TrailingZeroCount(value);
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 307
- Joined: Wed Sep 01, 2021 4:08 pm
- Location: Germany
- Full name: Roland Tomasi
Re: Issue with Net 5.0
That's odd. You should be able to just host any system.windows.forms form with the WindowsFormsHost WPF control. If you can't load your form within a WPF host, that may be because you use different frameworks for the assembly containing the form and the WPF assembly.
-
- Posts: 1062
- Joined: Tue Apr 28, 2020 10:03 pm
- Full name: Daniel Infuehr
Re: Issue with Net 5.0
https://docs.microsoft.com/en-us/dotnet ... esktop-4.8Chessnut1071 wrote: ↑Mon Dec 13, 2021 5:44 am Okay, I see the advantage of bit boards, at least on pseudo move generation; however, Net 3.0 doesn't support bit scan forward. So, I took the advice of some on this board and target Net 5.0. I got the intrinsic bit operations working and it runs 9.9x faster than my code work around. The problem is Net 5.0 doesn't update my labels and the WPF doesn't support some of my Win forms code. I need the speed, but, I also need my graphics and forms code. Am I missing an assembly or namespace? It seems like 100s of other programmers are having the same issue with Net 5.0. Does Net 6.0 have better support for Win Forms?
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
Daniel Inführ - Software Developer
-
- Posts: 313
- Joined: Tue Aug 03, 2021 2:41 pm
- Full name: Bill Beame
Re: Issue with Net 5.0
FRUSTRATION!dangi12012 wrote: ↑Mon Dec 13, 2021 3:20 pmhttps://docs.microsoft.com/en-us/dotnet ... esktop-4.8Chessnut1071 wrote: ↑Mon Dec 13, 2021 5:44 am Okay, I see the advantage of bit boards, at least on pseudo move generation; however, Net 3.0 doesn't support bit scan forward. So, I took the advice of some on this board and target Net 5.0. I got the intrinsic bit operations working and it runs 9.9x faster than my code work around. The problem is Net 5.0 doesn't update my labels and the WPF doesn't support some of my Win forms code. I need the speed, but, I also need my graphics and forms code. Am I missing an assembly or namespace? It seems like 100s of other programmers are having the same issue with Net 5.0. Does Net 6.0 have better support for Win Forms?
Been there, done that, have the t-shirt. I still get the same error: Net 5.0 C# Wpf
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Numerics;
using WindowsFormsIntegration;CSO246 error Type or namespace WindowsFormsIntegration could not be found
using System.Windows.Forms; CSO234 error: Type or namespace "Forms" does not exist in the namespace System.Windows
namespace WpfApp2
{
.....
}
Perhaps Net 5.0 doesn't like me.
-
- Posts: 181
- Joined: Sun Dec 08, 2019 8:16 pm
- Full name: Dmitry Shechtman
Re: Issue with Net 5.0
The namespace should be System.Windows.Forms.Integration.Chessnut1071 wrote: ↑Mon Dec 13, 2021 5:14 pm using WindowsFormsIntegration;CSO246 error Type or namespace WindowsFormsIntegration could not be found
using System.Windows.Forms; CSO234 error: Type or namespace "Forms" does not exist in the namespace System.Windows
namespace WpfApp2
{
.....
}
Perhaps Net 5.0 doesn't like me.
You're probably missing a framework reference to WindowsFormsIntegration (and to System.Windows.Forms, apparently).
-
- Posts: 313
- Joined: Tue Aug 03, 2021 2:41 pm
- Full name: Bill Beame
Re: Issue with Net 5.0
Status: bit scan forward is working fine in Net 5.0; However, my labels are not updating on the Grid. It seems my program can no longer update, or refresh, like I could in Windows Forms. I think this is a WPF issue which probably has a simple solution. There are no errors or warnings, just no update to the labels I use for debugging. Net 5.0 is brand new to me and you can no longer refresh a control in WFP. I would go back to my Windows forms, but, the intrinsic bit operations are over 9x faster than my C# code work around. It seems like 100s of other programmers are having similar issues, most converting to Net 5.0 from earlier version too. This seems so simple, how do you refresh controls in WPF?R. Tomasi wrote: ↑Mon Dec 13, 2021 11:20 amThat's odd. You should be able to just host any system.windows.forms form with the WindowsFormsHost WPF control. If you can't load your form within a WPF host, that may be because you use different frameworks for the assembly containing the form and the WPF assembly.
-
- Posts: 95
- Joined: Fri Nov 09, 2012 12:36 am
Re: Issue with Net 5.0
stop using 5.0
start using 6.0
start using 6.0
-
- Posts: 313
- Joined: Tue Aug 03, 2021 2:41 pm
- Full name: Bill Beame
-
- Posts: 313
- Joined: Tue Aug 03, 2021 2:41 pm
- Full name: Bill Beame