Closed stevenmoberg closed 3 years ago
Hi, sorry for the delay.
This shouldn't be related to linqpad.
Looking at the error message. Looks like the issue is related to locating the custom addnewpart method of the current part.
Can you share the file in question so i can debug and see what I can do? Also, are you using the latest source or what is in nuget today? There may be a possibility that i haven't pushed this fix to nuget yet.
Here is a very simply pptx I got off the internet that has the same ambiguous exception I could not find it on nuget so I'm using the v0.2.1-alpha from github release link https://github.com/rmboggs/Serialize.OpenXml.CodeGen/releases
Ok, the most current release is 0.3.2-alpha here and in nuget. You may have not seen it in nuget because it is still considered a prerelease. Nuget details
Also, Looking at the project changelog, it looks like I fixed an ambiguous exception issue with the 0.3.0-alpha release. I'm going to make sure that the latest release is available here (looks like I haven't updated github in awhile, my fault). Can you check your office document file against the 0.3.2-alpha release and see if the exception still occurs?
This release - v0.3.2-alpha should fix this issue. Please let me know what you find.
I can confirm that the AmbiguousMatchException
does not occur with the latest version, 0.3.2-alpha, using the referenced file in this issue. I will close this issue later today unless there are any further followups.
Closing issue because fix has already been applied to main branch.
yes that fixed the issue. I was trying to make sense of what it generated and forgot to reply, sorry
Hello, testing with a very simple PPTX and getting a AmbiguousMatchExpression exception with the call to GenerateSourceCode()
at System.RuntimeType.GetMethodImpl(String name, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers) at System.Type.GetMethod(String name) at Serialize.OpenXml.CodeGen.OpenXmlPartExtensions.BuildEntryMethodCodeStatements(IdPartPair part, NamespaceAliasOptions opts, IDictionary
2 typeCounts, ISet1 namespaces, OpenXmlPartBluePrintCollection blueprints, KeyValuePair
2 rootVar) at Serialize.OpenXml.CodeGen.OpenXmlPartExtensions.BuildEntryMethodCodeStatements(IdPartPair part, NamespaceAliasOptions opts, IDictionary2 typeCounts, ISet
1 namespaces, OpenXmlPartBluePrintCollection blueprints, KeyValuePair2 rootVar) at Serialize.OpenXml.CodeGen.OpenXmlPackageExtensions.GenerateSourceCode(OpenXmlPackage pkg, NamespaceAliasOptions opts) at Serialize.OpenXml.CodeGen.OpenXmlPackageExtensions.GenerateSourceCode(OpenXmlPackage pkg)
Is this is known issue or would it be related to running in LinqPad?