A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

Post by bairog » Tue Sep 19, 2023 2:49 pm

Hello.
I wanted to create a new application to demonstrate left axis strange behavior but I failed at the very beginning :(
I use latest Visual Studio Enterprise 2022 17.7.4 and latest Steema.TeeChart.NET 4.2023.8.31 nuget package.

For WinForms App targeting .NET Framework 4.0 it is no even compiling (TeeChart WPF and TeeChart tabs are added to a toolbox and I drop TChart control from a TeeChart tab to my form):
Image

For WinForms App targeting .NET Framework 4.8 it fails in runtime (TeeChart.WinForm, TeeChart.WPF and TeeChart tabs are added to a toolbox and I have to drop TChart control from a TeeChart.WinForm tab to my form because TeeChart tab lacks that control):
Image

Same situation appears in latest Visual Studio Enterprise 2019 16.11.30 but in that IDE TeeChart* tab on a toolbox is not even created. But if I add new TChart to a form via code - same errors occurs (respecting target .NET Framework version).

What is my mistake?

Marc
Site Admin
Site Admin
Posts: 1217
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

Post by Marc » Tue Sep 19, 2023 5:34 pm

Hello,

This is unexpected behaviour. We'll run a check to confirm.

Regards,
Marc Meumann
Steema Support

Marc
Site Admin
Site Admin
Posts: 1217
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

Post by Marc » Tue Sep 19, 2023 6:13 pm

Hello,

We've checked, here's the workaround that tested ok here re-tracing your steps.

After adding TeeChart via Nuget, look for Microsoft's "System.Text.Json" in the Nuget Manager and install it. The latest version is v7.03. The version number is a misnomer, it doesn't depend on the later framework, you'll see a dependency for Framework 4.6+.

Rebuild all and the project should run ok. We'll check what we can do to improve required steps here.

Regards,
Marc
Steema Support

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

Post by bairog » Wed Sep 20, 2023 5:11 am

Marc wrote:
Tue Sep 19, 2023 6:13 pm
After adding TeeChart via Nuget, look for Microsoft's "System.Text.Json" in the Nuget Manager and install it. The latest version is v7.03.
So when targeting .NET Framework 4.8:
  1. workaround solves the problem in VS 2022 17.7.4
  2. workaround doesn't NOT solve the problem in VS 2019 16.11.30:
    Image
To sum up current problems are:
  1. VS 2022 and NFW 4.8 - not working out of the box, adding latest System.Text.Json nuget solves the problem.
  2. VS 2022 and NFW 4.0 - not working out of the box (license.licx problem), no workaround for now.
  3. VS 2019 and NFW 4.8 - not working out of the box, adding latest System.Text.Json nuget DOESN'T solve the problem.
  4. VS 2019 and NFW 4.0 - not working out of the box (license.licx problem), no workaround for now.
  5. In VS 2022 for NFW 4.8 TeeChart.WinForm, TeeChart.WPF, TeeChart tabs are added (TChart control is on TeeChart.WinForm tab):
    Image
    while for NFW 4.0 TeeChart WPF and TeeChart tabs are added to a toolbox (TChart control is on TeeChart tab):
    Image
    Is that by design or a bug?
  6. In VS 2019 both for NFW 4.8 and NFW 4.0 TeeChart* tabs are NOT added to a toolbox. Is that a bug?

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

Post by bairog » Mon Sep 25, 2023 5:19 am

Hmm, 5 days have passed (a full 3 business days) - still no reaction. Very disappointing..

Rubén
Newbie
Newbie
Posts: 18
Joined: Fri Nov 19, 2010 12:00 am

Re: A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

Post by Rubén » Mon Sep 25, 2023 7:34 am

Good morning,

I apologize for the delay. Thank you for providing us with all this information.

We are working on resolving the issue for avoid manually have to add the "System.Text.Json" dependency. In VS2019 and VS2022, adding the dependency to your project should fix it. If the error persists, please try cleaning the "bin" / "obj" folders or cleaning the solution.

The NFW4.0 version is deprecated, so it's likely that many things won't work. Currently, the minimum version is NFW4.8. We are aware that in some versions, the "toolbox" may appear differently, and we will try to address this.

Thanks,
Ruben

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

Post by bairog » Mon Sep 25, 2023 9:46 am

Rubén wrote:
Mon Sep 25, 2023 7:34 am
The NFW4.0 version is deprecated, so it's likely that many things won't work. Currently, the minimum version is NFW4.8.
Latest Steema.TeeChart.NET 4.2023.8.31 nuget targets .NET Framework 4.0 among others. Targeting means that package is stably working and supported on that TFM, isn't it? Support cannot result in situation when "many things won't work".
P. S. If despite of that NFW 4.0 support was actually dropped - what is the latest package version that supports it?

Rubén
Newbie
Newbie
Posts: 18
Joined: Fri Nov 19, 2010 12:00 am

Re: A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

Post by Rubén » Mon Sep 25, 2023 12:49 pm

bairog wrote:
Mon Sep 25, 2023 9:46 am
If despite of that NFW 4.0 support was actually dropped - what is the latest package version that supports it?
The latest version that supports .NET 4.0 is "4.2023.4.18", should work fine in that version.
bairog wrote:
Mon Sep 25, 2023 9:46 am
Targeting means that package is stably working and supported on that TFM, isn't it
We need to increase the minimum required version for the package. Thank you.

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

Post by bairog » Mon Sep 25, 2023 1:09 pm

Rubén wrote:
Mon Sep 25, 2023 12:49 pm
The latest version that supports .NET 4.0 is "4.2023.4.18", should work fine in that version.
What do you mean? As you can see from my previous post new application for NFW 4.0 is not compiling both in VS 2022 and VS 2019.
Rubén wrote:
Mon Sep 25, 2023 12:49 pm
We need to increase the minimum required version for the package. Thank you.
Yes, but first you need to provide a workaround how to fix compile error on NFW 4.0 if you suppose 4.2023.4.18 stable on that platform.

Marc
Site Admin
Site Admin
Posts: 1217
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

Post by Marc » Mon Sep 25, 2023 3:28 pm

Hello,

We're checking the options here. Our test results for VSNet2019:
  • If you wish to use Framework 4.0, we confirm that TeeChart v4.2023.4.18 works correctly on Winform for both a designtime and runtime chart.
  • If you are able to use Framework 4.5.1, we confirm that TeeChart v4.2023.8.31, the latest version, works correctly on Winform for both a designtime and runtime chart.
  • If you wish to use Framework 4.8 and TeeChart v4.2023.8.31, we confirm that:
    - a manual dependency for System.text.json is required
    - It will work correctly on Winform for a runtime but not at designtime chart.
    - This last area, 4,8 and latest build of TeeChart, is where we are working to provide a transparent solution.
What version do you wish to use?

Re:
VS 2022 and NFW 4.0 - not working out of the box (license.licx problem), no workaround for now.
Remove any TeeChart text lines from the licx file.

With thanks.
Regards,
Marc
Steema Support

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: A new WinForms App (.NET Framework 4.x) created from a scratch is not compiling

Post by bairog » Tue Sep 26, 2023 4:52 am

Marc wrote:
Mon Sep 25, 2023 3:28 pm
If you wish to use Framework 4.0, we confirm that TeeChart v4.2023.4.18 works correctly on Winform for both a designtime and runtime chart.
I confirm that versions up to and including v4.2023.8.3 work correctly (out-of-the box, no extra steps are necessary) on .NFW 4.0 for both a designtime and runtime chart (both VS 2019 and 2022):
Image
We will use that version in our deep legacy projects (where .NFW 4.0 is the only option).
Marc wrote:
Mon Sep 25, 2023 3:28 pm
  • If you wish to use Framework 4.8 and TeeChart v4.2023.8.31, we confirm that:
    - a manual dependency for System.text.json is required
    - It will work correctly on Winform for a runtime but not at designtime chart.
    - This last area, 4,8 and latest build of TeeChart, is where we are working to provide a transparent solution.
It is clear that you will fix for .NFW 4.8 only (I suppose you will also drop .NFW 4.0 target in next versions to avoid misleading developers).
Marc wrote:
Mon Sep 25, 2023 3:28 pm
Re:
VS 2022 and NFW 4.0 - not working out of the box (license.licx problem), no workaround for now.
Remove any TeeChart text lines from the licx file.
As I investigated above VS 2022 and NFW 4.0 works correctly with v4.2023.8.3 (out-of-the box, no extra steps are necessary).

Post Reply