Advanced reporting
and data visualization components for .NET
LIVE CHAT Welcome, guest

 





WPF interop ReportDesigner throws NotSupportedException
Display Posts for:
Invert
Roman Eisendle 06/30/2009 09:30
WPF interop ReportDesigner throws NotSupportedException

hello,

I´m using the ReportDesigner control in a WPF application (with WindowsFormsHost control).

the constructor of the ReportDesigner class throws the following exception:

System.NotSupportedException: The invoked member is not supported in a dynamic assembly.
at System.Reflection.Emit.InternalAssemblyBuilder.get_CodeBase()
at System.Reflection.Assembly.get_EscapedCodeBase()
at PerpetuumSoft.Framework.Licensing.PerpetuumSoftLicenseProvider.GetAllLicenses(String assemblyQualifiedName)
at PerpetuumSoft.Framework.Licensing.PerpetuumSoftLicenseProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
at PerpetuumSoft.Reporting.Licensing.ReportLicenseProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
at PerpetuumSoft.Reporting.View.ReportViewer.ValidateLicense()
at PerpetuumSoft.Reporting.View.ReportViewer..ctor()
at Asut.Enopsys.Modules.Core.Reporting.ReportDesignerForm.InitializeComponent() in D:\Projekte\Enopsys\Main\Source\Enopsys.Presentation\ReportDesignerForm.Designer.cs:line 31
at Asut.Enopsys.Modules.Core.Reporting.ReportDesignerForm..ctor() in D:\Projekte\Enopsys\Main\Source\Enopsys.Presentation\ReportDesignerForm.cs:line 16
at Asut.Enopsys.Presentation.ReportControlGenerator.GenerateReportDesigner() in D:\Projekte\Enopsys\Main\Source\Enopsys.Presentation\ReportControlGenerator.cs:line 20
at Asut.Enopsys.Modules.Core.Reporting.ReportManagementView..ctor() in D:\Projekte\Enopsys\Main\Source\Modules\Enopsys.Modules.System\Reporting\ReportManagementView.xaml.cs:line 45
at BuildUp_Asut.Enopsys.Modules.Core.Reporting.ReportManagementView(IBuilderContext )
at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)


i recognized that my application creates dynamic assemblies (the Application loads UI modules at runtime, via the Composite Application Library aka Prism) which do not have a codebase (property EscapedCodeBase seems to be used by internal implementation of license manager).

regards
Roman Eisendle 07/06/2009 01:45
WPF interop ReportDesigner throws NotSupportedException

i forgot to mention, that we are targeting .net 4.0 framework Beta 1. In ealier versions of .net framework this problem does not appear.

after some investigation with reflector i have discovered, that in .net 4.0 dynamic assemblies are not of type "AssemblyBuilder" any more (i hope you unterstand what that means, in context of the license manager). although i understand that you will not provide any support for .net 4.0 yet, this will become a big problem when .net 4.0 is RTM.

could you maybe provide a fixed version, which work around this problem. (not relying on the AssemblyBuilder class to detect dynamic assemblies and instead catching the exceptions which are thrown by the CodeBase property)

regards
Anton Krotov 07/10/2009 01:59
WPF interop ReportDesigner throws NotSupportedException

Hello,

We didn’t make test on the .Net Framework 4.0 Beta 1. We’ll do this and try to make all the necessary changes for assurance of compatibility, but, unfortunately, we can’t point the due-date.

Best regards,
Anton Krotov
Perpetuum Soft Support Team