ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Problem compiling with .NET 4.6.0 under IKVM
Posted by David on Feb-16-2020 07:40
I'm trying to compile using the Java 4.0.0 and the .NET 4.6.0 (got the standard one via the zip download, not via NuGet).

When I try to create the IKVM stub I get the following:

  "....toolsikvmikvmstub.exe" -r:....toolsikvmIKVM.OpenJDK.SwingAWT.dll -nostdlib -lib:C:WindowsMicrosoft.NET
  Frameworkv4.0.30319 -out:buildWRstubnetchartdir.jar .libnetchartdir.dll
EXEC : error : unable to find assembly 'PresentationFramework, Version=, Culture=neutral, PublicKeyToken=31bf385
6ad364e35' [C:gitJenovaengineDotNetEnginedotnetengine.proj]
C:gitJenovaengineDotNetEnginedotnetengine.proj(287,3): error MSB3073: The command ""....toolsikvmikvmstub.exe"
-r:....toolsikvmIKVM.OpenJDK.SwingAWT.dll -nostdlib -lib:C:WindowsMicrosoft.NETFrameworkv4.0.30319 -out:buildW
Rstubnetchartdir.jar .libnetchartdir.dll" exited with code 1.

The only difference is the new netchartdir.dll.

Any ideas?

thanks - dave

  Re: Problem compiling with .NET 4.6.0 under IKVM
Posted by Peter Kwan on Feb-17-2020 02:43
Hi David,

I have just responded to your other message, and in it, I explained the differences between .NET Core and .NET Framework.

The "netchartdir.dll" in the zip download is for the ".NET Framework". I remembered you had tried the pre-released version of ChartDirector for .NET Core. At that time, we probably release the .NET Core as a DLL also called "netchartdir.dll". In the final release, we have decided to distribute the DLL using nuget for handling .Net Core dependencies. We also change the file name to "ChartDirector.Net.dll", as it is the standard naming convention in nuget.

As explained in my other post, the ChartDirector for the .NET Framework includes everything supported by ChartDirector. This means it includes WPF support. I am not familiar with your toolchain, but some non-Microsoft .NET implementation (such as Mono) does not support WPF. The missing "PresentationFramework" in the error message is an assembly for WPF support included in Microsoft .NET 4.0. See:

For your case, you can use the "ChartDirector.Net.dll" instead. Designed for .Net Core, it includes only the "bare minimum" required to support ChartDirector for web and console applications, so it does not need WPF. (That's why for .Net Core, we split into two packages "ChartDirector.Net" and "ChartDirector.Net.Desktop.Controls".)

Peter Kwan

  Re: Problem compiling with .NET 4.6.0 under IKVM
Posted by David on Feb-17-2020 03:44
Hi Peter;

Thank you for your reply. Fast explanation of our system - we are a library that can be part of a Forms, ASP.NET, console, or anything else (and shortly anything .NET Core). The only thing we use your program for is to create a chart object and then render it to: PNG, SVG, or PDF.

From what you said, I believe that means we should use the .NET Core ChartDirector.Net.dll for both .NET Framework & .NET Core - correct?

This is great that both can share this - it means we can have a single NuGet package for our library that runs on both .NET Framework & .NET Core.

thanks - dave

ps - All the best to you and everyone there in Hong Kong. I hope it works out well.

  Re: Problem compiling with .NET 4.6.0 under IKVM
Posted by Peter Kwan on Feb-17-2020 17:03
Hi David,

Yes, if you just need to create chart images, you can use ChartDirector.Net.dll. It is actually a .NET Standard 2.0 DLL. According to Microsoft, ,NET Standard 2.0 is supported by both .NET Core 2.0 (or later), and by .NET Framework 4.6.1 (or later). See:

The "ChartDirector.Net" nuget package contains both "ChartDirector.Net.dll", and "netchartdir.dll". As mentioned above, the "ChartDirector.Net.dll" works on both .NET Standard 2.0 (or later) and .NET Framework 4.6.1 (or later). The "netchartdir.dll" only works on .NET Framework, but it also works in earlier .NET Framework versions (4.0 or later), and it includes the "WebChartViewer" for technologies only available in .NET Framework (such as ASP.NET Web Forms and ASP.NET MVC).

From your description, you would not need to use the ChartDirector "WebChartViewer", so the "ChartDirector.Net.dll" should be sufficient. The only thing is if used on the .NET Framework, it requires .NET Framework 4.6.1 or later. If you must use earlier versions of the .NET Framework, it is better to use "netchartdir.dll" for the .NET Framework, and "ChartDirector.Net.dll" for the .NET Core. They are both contained in the same NuGet package.

If you use Visual Studio, it will automatically choose the best DLL to use from the NeGet package based on project type. If you are using other toolchain, you may need to configure your build scripts to choose the DLL to use.

Peter Kwan