Licensing with .NET 6 App

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Kris C
Newbie
Newbie
Posts: 7
Joined: Fri Jan 13, 2023 12:00 am

Licensing with .NET 6 App

Post by Kris C » Thu Mar 16, 2023 1:46 pm

Hello,
I've found other postings about licensing with .NET6 but I wanted to post my own question about it.

Due to how our code base is configured and the fact that we run within multiple platforms (programs that we do not deploy and therefore cannot embed the file into), embedding the licenses file does not work for us. We have therefore used the approach of having it in the output file next to the TeeChart.dll.

This works for net472.

It does NOT work for net6.0-windows. I confirmed that the TeeChart.Licenses file is next to the TeeChart.dll and TeeChart.WinForm.dll in the output file when building net6.0-windows. But at runtime, we still get the watermark.

What is the missing step to get this working properly in .net6?

Thanks,

Kris Culin

Christopher
Guru
Posts: 1508
Joined: Fri Nov 15, 2002 12:00 am

Re: Licensing with .NET 6 App

Post by Christopher » Fri Mar 17, 2023 8:54 am

Hello Kris,

I've just run a test using this specific NuGet:
https://www.nuget.org/packages/Steema.T ... .2023.3.13

Running this in a WinExe project in framework net6.0-windows with the TeeChart.licenses set to Copy always:
Screenshot from 2023-03-17 09-45-20.png
Screenshot from 2023-03-17 09-45-20.png (11.2 KiB) Viewed 102 times
Produces a Chart without a watermark. So we now have to discover what is different about your set up. Which NuGet package are you using? Is your TeeChart.licenses set to 'Copy always' (you could try this in a simple test project to be sure)? Do you have a valid license for TeeChart for .NET 6.0? You can check this latter question by visiting:
https://www.steema.com/linkIn/License_information_check

And pasting in the content of your TeeChart.licenses file—one of the 'Assembly name' should contain 'teechart.winform', and the version of NuGet you are using should be of a datetime anterior to the license expiry date.

If you are still experiencing problems, could you please send your TeeChart.licenses file in an email to sales@steema.com and we will check the issue here using it.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Kris C
Newbie
Newbie
Posts: 7
Joined: Fri Jan 13, 2023 12:00 am

Re: Licensing with .NET 6 App

Post by Kris C » Fri Mar 17, 2023 6:40 pm

Hi Christopher,

Shouldn't the licenses file work for both net472 and net6 TeeChart assemblies? it does work for net472. It's in the output folder for the net472 build. It's there for the net6.0-windows build. But the watermark *shows* for the latter.

I used the license verifier and teechart and teechart.winform are both listed.

Unfortunately, we cannot use the NuGet package. This is because we need to add some custom behavior for the export button to allow our users to save files to a specialized location. There is no hook for me to use otherwise. This means we have to build the assemblies and reference them directly.

We use a condition on the reference to TeeChart.WinForm.dll so it is only "used" if the target framework is net6.0-windows.

Could we possibly embed the licenses file into the TeeChart or TeeChart.dll file when we build it?

Kris

Christopher
Guru
Posts: 1508
Joined: Fri Nov 15, 2002 12:00 am

Re: Licensing with .NET 6 App

Post by Christopher » Mon Mar 20, 2023 10:27 am

Hello Kris,

we really need to be able to reproduce this issue here to see if we can fix it. If I remove the NuGet package from my test project and try to add in the TeeChart.WinForm.dll directly, Visual Studio v.17.5.2 gives me an error message:
Screenshot from 2023-03-20 11-24-16.png
Screenshot from 2023-03-20 11-24-16.png (87.76 KiB) Viewed 75 times
The log tells me:

Code: Select all

=====================
20/03/2023 11:23:44
Recoverable
Microsoft.Build.Exceptions.BuildAbortedException: MSB4188: Build was canceled.
===================
I'm not sure what's going on here, but it does mean I cannot try to reproduce your issue by running a Windows Form .NET 6.0 project without referencing the NuGet file.

What we would be looking for from you, if possible, is a Short, Self Contained, Correct (Compilable), Example—if we can reproduce the problem here we can evaluate possible strategies to mitigate the issue.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply