Incorrect binding
Hello, I have Windows Forms application, the latest version of confuser and generic List<ExcludedProgramStructType> with structure
public struct ExcludedValueStructType { public String Value { get; set; } }
The list is binded to DevExpress GridControl component. GridControl.DataSource = List_ExcludedValueStruct;
When I obfuscate the application with parameter
Thank you.
Could you provide an obfuscated sample ? Both original and obfuscated file
The problem is caused by structure member renaming. If I use attribute for the excluding member from obfuscation, it works.
[ObfuscationAttribute(Exclude = true)] public struct ExcludedValueStructType { [ObfuscationAttribute(Exclude = true)] public String Value { get; set; } }
Hi,
I am too having similar Issue.I am using v1.0 of ConfuserEx. But in my case when I run Obfuscated App on dev machine it runs fine and when I move same obfuscated app to production machine I get below error:
'GOF.ClientUI.Views.Reports.PrintFormatPdfViewerView' does not contain a definition for 'GetReportDataSource'
Stack Trace captured using Exceptionless
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'GOF.ClientUI.Views.Reports.PrintFormatPdfViewerView' does not contain a definition for 'GetReportDataSource' at CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, GOF.ClientUI.Views.Reports.PrintFormatPdfViewerView, System.Object, System.String) at offset -1 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](System.Runtime.CompilerServices.CallSite site, System.Dynamic.T0 arg0, System.Dynamic.T1 arg1, System.Dynamic.T2 arg2) at offset 289 at GOF.ClientUI.Views.Reports.PrintFormatPdfViewerView.ProcessReport() at offset 753 at GOF.ClientUI.Views.Reports.PrintFormatPdfViewerView.(System.Object, System.EventArgs) at offset 0 at Syncfusion.Windows.Forms.Tools.ComboBoxBaseDataBound.OnSelectedIndexChanged(System.EventArgs e) at offset 22 at Syncfusion.Windows.Forms.Tools.ComboBoxAdv.OnSelectedIndexChanged(System.EventArgs e) at offset 0 at Syncfusion.Windows.Forms.Tools.ComboBoxBaseDataBound.set_SelectedIndex(System.Int32 value) at offset 168 at GOF.ClientUI.Views.Reports.PrintFormatPdfViewerView.FillPrintFormats(System.Collections.Generic.List1 formats) at offset 151
at GOF.ClientUI.Presenters.Reports.PrintFormatPdfViewerPresenter.(GOF.ClientUI.Interface.Reports.IPrintFormatViewer, System.Collections.Generic.List1) at offset 0 at GOF.ClientUI.Presenters.Reports.PrintFormatPdfViewerPresenter.(System.Object, System.EventArgs) at offset 0 at System.Windows.Forms.Form.OnLoad(System.EventArgs e) at offset 151 at System.Windows.Forms.Form.OnCreateControl() at offset 36 at System.Windows.Forms.Control.CreateControl(System.Boolean fIgnoreVisible) at offset 191 at System.Windows.Forms.Control.CreateControl() at offset 7 at System.Windows.Forms.Control.WmShowWindow(System.Windows.Forms.Message& m) at offset 66 at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message& m) at offset 1457 at System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message& m) at offset 58 at System.Windows.Forms.ContainerControl.WndProc(System.Windows.Forms.Message& m) at offset 19 at System.Windows.Forms.Form.WmShowWindow(System.Windows.Forms.Message& m) at offset 17 at System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message& m) at offset 546 at Syncfusion.Windows.Forms.MetroForm.WndProc(System.Windows.Forms.Message& m) at offset 870 at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(System.Windows.Forms.Message& m) at offset 0 at System.Windows.Forms.Control.ControlNativeWindow.WndProc(System.Windows.Forms.Message& m) at offset 142 at System.Windows.Forms.NativeWindow.Callback(System.IntPtr hWnd, System.Int32 msg, System.IntPtr wparam, System.IntPtr lparam) at offset 37
Also when I move original app to production machine it runs fine without any issue.
Here is the code where I am using method GetReportDataSource in same class.
Method :
private Microsoft.Reporting.WinForms.ReportDataSource GetReportDataSource(dynamic dataSource, string dsName) { var bds = new System.Windows.Forms.BindingSource { DataSource = dataSource }; return new Microsoft.Reporting.WinForms.ReportDataSource(dsName, bds); }
Callers:
e.DataSources.Clear(); foreach (var dsName in dss) { var dbds = OnSubReportDataRequested?.Invoke(parameters, dsName); if (dbds == null) continue; CurrentDataSource = dbds; var _rds = GetReportDataSource(dbds.DataSource, dsName); e.DataSources.Add(_rds); }
Hello,
Is it please possible to exclude from obfuscation content of embedded manifest?
Thank you very much
Regards
David