SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

0
0

I got this problem:

Any idea how to resolve this:

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools>sgen.exe /assembly:F:\AMSV2\AMS\bin\Debug\AMS.exe
Microsoft (R) Xml Serialization support utility
[Microsoft (R) .NET Framework, Version 4.6.81.0]
Copyright (C) Microsoft Corporation. All rights reserved.
Error: Unable to generate a temporary class (result=1).
error CS0433: The type ‘XamlGeneratedNamespace.GeneratedInternalTypeHelper’ exists in both ‘f:\AMSV2\AMS\bin\Debug\SciChart.Charting.dll’ and ‘f:\AMSV2\AMS\bin\Debug\AMS.exe’
error CS0433: The type ‘XamlGeneratedNamespace.GeneratedInternalTypeHelper’ exists in both ‘f:\AMSV2\AMS\bin\Debug\SciChart.Charting.dll’ and ‘f:\AMSV2\AMS\bin\Debug\AMS.exe’

Version
4.2.0.9172
  • You must to post comments
0
0

Hello Rui,

I have a question: are you using ILMerge or something related to it ?

Please take a look at this article:
http://roman.st/Article/ILMerge-and-GeneratedInternalTypeHelper

Best regards,
Nazariy Pelyushkevych
SciChart Wpf\Xamarin developer

  • You must to post comments
0
0

Hello Nazariy,

Thank you for your quick answer. I am not using ILMerge that I know…
I am trying to find where and why I got serialization issues in my output project window kind off :

Exception thrown: ‘System.IO.FileNotFoundException’ in mscorlib.dll
Exception thrown: ‘System.IO.FileNotFoundException’ in System.Xml.dll

And when I run sgen I get stuck in
sgen.exe F:\AMSV2\AMS\bin\Debug\AMS.exe

error CS0433: The type ‘XamlGeneratedNamespace.GeneratedInternalTypeHelper’ exists in both ‘f:\AMSV2\AMS\bin\Debug\SciChart.Charting.dll’ and ‘f:\AMSV2\AMS\bin\Debug\AMS.exe’
error CS0433: The type ‘XamlGeneratedNamespace.GeneratedInternalTypeHelper’ exists in both ‘f:\AMSV2\AMS\bin\Debug\SciChart.Charting.dll’ and ‘f:\AMSV2\AMS\bin\Debug\AMS.exe’

  • You must to post comments
0
0

The error

CS0433 drives me to these solution:

https://msdn.microsoft.com/en-us/library/64wh5743.aspx

The type TypeName1 exists in both TypeName2 and TypeName3

Two different assemblies referenced in your application contain the same namespace and type, which produces ambiguity.

To resolve this error, use the alias feature of the /reference (C# Compiler Options) compiler option or do not reference one of your assemblies.

I call 4 charts in a form. Does not make sense.. What I sould do?

  • You must to post comments
0
0

Hello Rui,

Can you provide me some steps to reproduce this issue, i mean what are you do to get into this issue? Or this problem occurs right from the start ?

Also did you’ve faced this problem with the previous versions of SciChart?

Best regards,
Nazariy Pelyushkevych
SciChart Wpf\Xamarin developer

  • You must to post comments
0
0

Hi Rui,

SciChart relies on serialization for image export, saving chart configuration, etc.

This issue seems to be a known WPF issue with XmlSerializer. There are some workarounds suggested by community available. You could try these and see if any works for you. We’ve stumbled upon this discussion on StackOverflow.

Please take a look and let us know if this helps,

Best regards,
Yuriy

  • You must to post comments
0
0

It is on startup.
The user controls are called after loaded. I believe it has to do with the SciChartSurface.SetRuntimeLicenseKey function because the serilization is called after. On the export data.

Attachments
  • You must to post comments
0
0

Hello Rui, i’ve got your attachments, and tried to simplify it to be able to run it. and so far i’m not getting any issue(so it seems that it’s not the SciChartSurface.SetRuntimeLicenseKey function), can you try the attached sample project to run and check for any issues? If not can you kindly modify that sample project to reproduce your issue, so we can investigate it, on our side?

Best regards,
Nazariy Pelyushkevych
SciChart Wpf\Xamarin developer

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.