none
Adding Custom assemblies causes exception in GetParameters RRS feed

  • Question

  • I have added a custom assembly to my rdl doc as I have to support multiple languages.  I have a standard VS project with the RDL doc loaded in the viewer and all is fine.

    I have a test app that programmatically creates the reportviewer.  Now that I have added the custom assembly, my test app blows up when I call reportViewer1.LocalReport.GetParameters()

    MESSAGE
    Error while loading code module: ‘prairieFyre.Resources.Translate, Version=1.0.0.0, Culture=neutral,
    PublicKeyToken=null’. Details: Could not load file or assembly 'prairieFyre.Resources.Translate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

    CALL STACK
       at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks)
       at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileReport(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks)
       at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions)
       at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot)

    I have placed my custom assemblies in the following spots
    C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies
    C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies
    <mytestapp>\bin\debug
    and the GAC.

    Does anyone know what I missed?
    Thanks,
    bushfoot
    Monday, November 17, 2008 6:33 PM

All replies

  • Where is the custom assembly?  Is it in the same directory as your application?  The ReportViewer will look for it using the standard search paths for loading an assembly.  Typically, this means you want your custom assembly in the same location as your application or in the GAC.  The fusion log may also help track down assembly load errors: http://msdn.microsoft.com/en-us/library/e74a18c4(VS.80).aspx
    Tuesday, November 18, 2008 7:55 AM
    Moderator