Hi Richard0378,
I have never tried Visual Studio for macOS, so I just downloaded it can try it.
I found that Visual Studio for macOS does not support .NET Framework at all. It only supports .NET Core and other frameworks (like Xaramin). The "NetWebCharts" are based on ASP.NET Web Forms of the .NET Framework, so Visual Studio for macOS cannot support it. Please use the "NetCoreRazorCharts" or "NetCoreMvcCharts". The first one is based on ASP.NET Core framework with Razor view engine. The second one is based on ASP.NET Core MVC framework.
The two ASP.NET Core examples uses .NET Core 2.x. I found out the Visual Studio for macOS does not automatically include .NET Core 2.x, so I have to separately download and install them.
https://dotnet.microsoft.com/download/dotnet/2.0
https://dotnet.microsoft.com/download/dotnet/2.1
Then I found out the .NET Core 2.x download does not include computer graphics capabilities, which we use to draw charts. According to Microsoft, we need to install libgdiplus as well:
https://docs.microsoft.com/en-us/dotnet/core/install/macos
After all of the above, I can compile and run the sample code, although the text looks different from that on Windows. (The text is rendered with libgdiplus.)
Hope this can help.
Regards
Peter Kwan |