-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when attempting to export objects. #55
Comments
@pgrm not at the moment unfortunately, but i'm fully aware of the issue. The problem is that an invalid string such as "Cannot evaluate expression" is retrieved from the debugger and it's attempted to be cast as a DateTime, this causes the exception. You might want to ensure that you are exporting the object in DEBUG mode, and make sure that the "Optimize code" is unchecked (it is by default). In the very near future (After spring break) a new version should be out which will inform you which properties could not be exported due to the debugger. Linked to #20 Exception Log: System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles):34
ObjectExporter.Core.Templates.CSharpGenerator.GetSingleTypeValue(Expression expression):431
ObjectExporter.Core.Templates.CSharpGenerator.ExportMembers(Expression expression, Int32 currentDepth, Boolean isLast):137
ObjectExporter.Core.Templates.CSharpGenerator.ExportMembers(Expression expression, Int32 currentDepth, Boolean isLast):562
ObjectExporter.Core.Templates.CSharpGenerator.ExportMembers(Expression expression, Int32 currentDepth, Boolean isLast):562
ObjectExporter.Core.Templates.CSharpGenerator.ExportMembers(Expression expression, Int32 currentDepth, Boolean isLast):562
ObjectExporter.Core.Templates.CSharpGenerator.TransformText():97
ObjectExporter.Core.ExportGenerator.GenerateText(Expression expression, ExpressionSourceType source):108
ObjectExporter.Core.ExportGenerator+<>c__DisplayClass1b.<GenerateTextAsync>b__1a():28
System.Threading.Tasks.Task`1.InnerInvoke():15
System.Threading.Tasks.Task.Execute():16
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task):11
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task):40
ObjectExporter.Core.ExportGenerator+<GenerateTextWithKey>d__8.MoveNext():407
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task):11
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task):40
ObjectExporter.VsPackage.Views.FormSelectObjects+<buttonExport_Click>d__2.MoveNext():420 |
Ok, thx for the info. Just one comment, I could see the values in the On Mon, Mar 14, 2016, 17:55 Omar Elabd [email protected] wrote:
|
Hmm, what type of object are you attempting to export? Is it a simple POCO? If the object has properties that are from different assemblies those might use a DateTime that couldn't be evaluated. If you can see all the values in the debugger then something else is going on. |
ok, so I have 2 simple And I have some Entity Framework (EF6) models which also don't work. The later is either single objects or also And I also had a simple string, Guid and POCO which all worked without any problems right away. |
EF6 models are another thing which i'm working on (see #23), because Entity Framework will add dynamic proxies to an object. You can try disabling the Dynamic Proxies and try re-exporting the object and see if that works. More information: |
ok, thx for the info on the EF issue - I guess that's my biggest pain. I think other poco did work and if the two datetime fields don't work I can live with that. That much I can copy paste from the debugger. |
I'm getting this error for every object I try, even a simple string. |
I'm getting seemingly random errors when I try to export an object. Some complex objects work, others don't and than I get this error also when I try exporting a
DateTime
value.Any chance I can see the underlying exception? Thx
The text was updated successfully, but these errors were encountered: