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

Type 'Telerik.Reporting.Drawing.Unit' does not have a constructor with parameters of types Double, UnitType.

8 Answers 961 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shaun Reichter
Top achievements
Rank 1
Shaun Reichter asked on 18 Feb 2010, 08:18 PM

I just upgraded Telerik Reporting to Q3 2009 (version 3.2.9.1211), and now I receive an error whenever I try to open a report in design mode in Visual Studio 2008:

 

Type 'Telerik.Reporting.Drawing.Unit' does not have a constructor with parameters of types Double, UnitType.

 

Granted, I am new to Telerik Reporting, but the code hasn’t changed, and it still works fine with Telerik Reporting Q2 2009.  It looks to me like the new version still does have a constructor with that signature, and my reports do indeed compile and run just fine.  Unfortunately, I can’t open them to edit them.

 

This is the call stack it gives me:

 

at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

 

I tried the "Ignore and Continue" option, but that just gives me another error.  Does anyone have any clue as to what I may have done wrong, or what I can do to correct this problem?  Thank you very much.

Shaun

8 Answers, 1 is accepted

Sort by
0
Shaun Reichter
Top achievements
Rank 1
answered on 04 Mar 2010, 10:46 PM
If anyone is interested, a solution to my problem has been found.  Updating the Telerik.Reporting version number in the .resx file made all the problems magically disappear.
0
Richard Watson
Top achievements
Rank 1
answered on 11 Aug 2010, 06:33 PM
Thanks Shaun, this worked for me as well on an update. I did have to shut down VS2008 and start it back up again in order for it to work completely. Also, I initially tried to edit the resx in the resx designer (where I couldn't for the life of me find the version #; have to right mouse and select "View Code" on the resx file). I found this at the very bottom of the resx file:

  <metadata name="$this.SnapGridSize" type="Telerik.Reporting.Drawing.Unit, Telerik.Reporting, Version=3.2.9.1211, Culture=neutral, PublicKeyToken=a9d7983dfcc261be">
    <value>0.10in</value>
  </metadata>
</root>
0
Shaun Reichter
Top achievements
Rank 1
answered on 11 Aug 2010, 08:04 PM
Thanks for posting, Richard, and thanks for clarifying the solution with more detail.  I should have been more clear about that.  This seems to be an uncommon problem, but it's nice to know I'm not the only one to encounter it.  Not sure how we got so lucky as to end up with our .resx files out of sync.  Anyway, I'm really glad this information was helpful to you.

Shaun
0
Steve
Telerik team
answered on 12 Aug 2010, 09:57 AM
Hello guys,

Generally the Upgrade Wizard takes care of updating all references including the .resx files, so it is very strange that this did not work for you. Have you by any chance tried updating your projects manually? If this is the case then as duly noted in the Upgrading to a Newer Version of Telerik Reporting article, you should update resx files as well, as you have found the hard way.

Best wishes,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Richard Watson
Top achievements
Rank 1
answered on 12 Aug 2010, 05:08 PM
Steve,

I did run the upgrade wizard. My project is a little convoluted as the data object comes from another project and the two projects together are then used in a Unit testing project and finally incorporated into a Windows Service (parts of that shouldn't matter at all). Here is the event object in the XML from the UpgradeWizardLog.xml:

<event action="Analyze" type="Error" name="Report1.resx" path="D:\Source\Projects\EnrollmentReportNew\EnrollmentReportNew\Report1.resx">System.Runtime.Serialization.SerializationException: Type  could not be read from the data in line 305, position 5.  The type's internal structure may have changed.  Either implement ISerializable on the type or provide a type converter that can provide a more reliable conversion format, such as text or an array of bytes.  The conversion exception was: No top object. ---> System.Xml.XmlException: Type  could not be read from the data in line 305, position 5.  The type's internal structure may have changed.  Either implement ISerializable on the type or provide a type converter that can provide a more reliable conversion format, such as text or an array of bytes.  The conversion exception was: No top object. Line 305, position 5. ---> System.Runtime.Serialization.SerializationException: No top object.
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
   at System.Resources.ResXDataNode.GenerateObjectFromDataNodeInfo(DataNodeInfo dataNodeInfo, ITypeResolutionService typeResolver)
   at System.Resources.ResXDataNode.GetValue(ITypeResolutionService typeResolver)
   at System.Resources.ResXResourceReader.ParseDataNode(XmlTextReader reader, Boolean isMetaData)
   at System.Resources.ResXResourceReader.ParseXml(XmlTextReader reader)
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at System.Resources.ResXResourceReader.ParseXml(XmlTextReader reader)
   at System.Resources.ResXResourceReader.EnsureResData()
   at System.Resources.ResXResourceReader.GetEnumerator()
   at Telerik.Reporting.UpgradeWizard.Engine.Utilities.ResourceFile..ctor(String fileName)
   at Telerik.Reporting.UpgradeWizard.Engine.ResourceItem.AnalyzeInternal()
   at Telerik.Reporting.UpgradeWizard.Engine.UpgradeItem.Analyze()</event>

If you want me to, I'll open a ticket and I can get the pre-upgrade file from source control. Given that you appear to have a very limited # of people with this issue, the XML in the resx file appears to be corrupt (just my observation from scanning the stack here), etc. It may not be worth the effort until/unless more people encounter this issue.

0
Ivan
Telerik team
answered on 13 Aug 2010, 04:16 PM
Hi Richard Watson,

Could you, please, open a support ticket for that problem and send us the 'corrupt' RESX file that the wizard fails to upgrade. Any additional information that you find relevant to this matter will be greatly appreciated.

Regards,
Ivan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Shonda
Top achievements
Rank 1
answered on 18 Mar 2011, 05:23 PM
I just had this happen to me upgrading from 2010 Q3 to 2011 Q1.

I corrected the issue by running the upgrade wizard once again.

0
richard
Top achievements
Rank 1
answered on 31 May 2011, 04:46 PM
yes has happened to me too. checker .resx file and it had the right versoin in it already.
Tags
General Discussions
Asked by
Shaun Reichter
Top achievements
Rank 1
Answers by
Shaun Reichter
Top achievements
Rank 1
Richard Watson
Top achievements
Rank 1
Steve
Telerik team
Ivan
Telerik team
Shonda
Top achievements
Rank 1
richard
Top achievements
Rank 1
Share this question
or