Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build of project with RDLC cannot find custom assembly

I've been tearing my hair out for three days trying to get an RDLC report to build in VS2010. I want to access a custom assembly from another project in the same solution in an expression for a Text item on a subreport. There is a reference to the assembly in the project containing the RDLC and I added a reference to the assembly DLL in the properties of the subreport, but when I build it I get an error telling me it cannot find the file:

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

The RDLC file appears to have no path information for the assembly in the XML and I have tried putting copies of the assembly in the bin\Debug folder under the project containing the RDLC and in the same folder as the RDLC without success.

Judging from what little I have been able to find about this, it appears I may have to register the assembly in the GAC to get the build to work, but I can't find any direct confirmation of that and putting it in the GAC just to get the build to run would be a major nuisance.

Am I missing something?

...Jim Hansen

like image 327
Jim Hansen Avatar asked Apr 11 '11 16:04

Jim Hansen


2 Answers

Following the @rockariotphobia answer, for visual studio 2015 use:

C:\Program Files (x86)\MSBuild\14.0\Bin
like image 194
alexandreubaldo Avatar answered Oct 22 '22 07:10

alexandreubaldo


One possible solution that worked for me is described in this post:

Reporting Services – Custom report error (Error while loading code module: MarketingPilot.Framework.dll)

I copied the assembly referenced in the error message to this folder:

C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies

Doing this I could debug the application without a problem. :)

like image 35
Leniel Maccaferri Avatar answered Oct 22 '22 06:10

Leniel Maccaferri