This is a migrated thread and some comments may be shown as answers.

VisualStudio2019 ChartPalette Throwing System.IO.IOException in Telerik .NET Core Assemblies

1 Answer 21 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 13 Dec 2019, 01:01 AM
Hi Team

I am in the process of migrating our WPF App from using .NET Framework 4.7.2 to .NET Core 3.1.

Migrating From :
 - Telerik UI for WPF .NET Framework NoXaml Binaries (Version R3 2019 SP1)
 - .NET Framework 4.7.2

Migrating To :
 - Telerik UI for WPF .NET Core NoXaml Binaries (Version R3 2019 SP1)
 - .NET Core 3.1

All has gone well so far with very little code change, however we have noticed a breaking change between the Telerik .NET Framework assemblies and the Telerik .NET Core assemblies.

We have a custom Dictionary of built-in ChartPalettes with custom display text that is bound to a dropdown box as per the below. Users are able to select a ChartPalette from the dropdown when displaying charts.

        /// <summary>
        /// Dictionary of <see cref="ChartPalette"/>s with custom display text
        /// </summary>
        public Dictionary<string, ChartPalette> Palettes { get; private set; }

            Palettes = new Dictionary<string, ChartPalette>
            {
                {"Spring", ChartPalettes.Spring},
                {"Summer", ChartPalettes.Summer},
                {"Autumn", ChartPalettes.Autumn},
                {"Arctic", ChartPalettes.Arctic},
                {"Warm", ChartPalettes.Warm},
                {"Cold", ChartPalettes.Cold},
                {"Crystal", ChartPalettes.Crystal},
                {"Flower", ChartPalettes.Flower},
                {"Fluent", ChartPalettes.Fluent},
                {"Forest", ChartPalettes.Forest},
                {"Grayscale", ChartPalettes.Grayscale},
                {"Green", ChartPalettes.Green},
                {"Ground", ChartPalettes.Ground},
                {"Lilac", ChartPalettes.Lilac},
                {"Material", ChartPalettes.Material},
                {"Office 2013", ChartPalettes.Office2013},
                {"Office 2016", ChartPalettes.Office2016},
                {"Pastel", ChartPalettes.Pastel},
                {"Rainbow", ChartPalettes.Rainbow},
                {"Visual Studio 2013", ChartPalettes.VisualStudio2013},
                {"Visual Studio 2019", ChartPalettes.VisualStudio2019},  // Does not work in Telerik .NET Core assemblies
                {"Windows 8", ChartPalettes.Windows8},
            };

The issue is that the VisualStudio2019 ChartPalette (from Telerik.Windows.Controls.ChartView) throws the below exception when using the Telerik .NET Core assemblies. This does not occur when using the Telerik .NET Framework assemblies.

System.IO.IOException: 'Cannot locate resource 'visualization/palettes/resources/visualstudio2019.xml'.'

StackTrace:
   at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
   at MS.Internal.IO.Packaging.PackagePartExtensions.GetSeekableStream(PackagePart packPart, FileMode mode, FileAccess access)
   at MS.Internal.IO.Packaging.PackagePartExtensions.GetSeekableStream(PackagePart packPart)
   at System.Windows.Application.GetResourceStream(Uri uriResource)
   at Telerik.Windows.Controls.ChartView.ChartPalettes.LoadPalette(String fileName)
   at Telerik.Windows.Controls.ChartView.ChartPalettes.get_VisualStudio2019()

I can confirm we have ALL Telerik .NET Core assemblies being referenced in our project including the Theme assemblies and styles. If we remove the VisualStudio2019 ChartPalette, it works perfectly without any issues.

Please can this be investigated.

1 Answer, 1 is accepted

Sort by
0
Vicky
Telerik team
answered on 16 Dec 2019, 01:05 PM

Hi Dean,

Thank you for the provided detailed information. It was of great help.

I investigated the described behavior and confirm that it is a bug. I logged the following bug report on our feedback portal - VisualStudio2019 ChartPalette throws an exception when using the .NET Core assemblies. It will be available with our next internal build, scheduled for the beginning of next week.

In the meantime, you can download our latest internal build and use the assemblies from it with combination of a custom build of the Telerik.Windows.Controls.Chart.dll which has the fix applied. Please, find the custom build of the Telerik.Windows.Controls.Chart.dll attached to my reply.

As a small gesture of gratitude for bringing this to our attention, I am updating your Telerik points.

Best Regards,
Vicky
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Dean
Top achievements
Rank 1
Answers by
Vicky
Telerik team
Share this question
or