SSRS 2008, custom dll, file not found

I fought SSRS now, and this is stupid. When I add a link to the dll (which is part of the same solution), it gives me nothing but

Mistake

[rsErrorLoadingCodeModule] when loading the code module: 'MyFile.MyClass.Code, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null. Details: Could not load file or assembly 'MyFile.MyClass.Code, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null or one of its dependencies. The system cannot find the specified file.

I tried using the solution configuration to say that the debugging source is in other places, copying the file to about 50 different locations (not gac, impossible), running Visual Studio 2008 as admin, all the dumb stuff you can think of ... nothing The same error every time.

Any ideas?

+8
ssrs-2008
source share
4 answers

Here is the correct answer. I had to fight this twice now and did not document it well enough, thinking for the first time that this was a one-time thing.

Put it in the SQL Server Bin folder for the server. for DEVELOPMENT place the copy in the Visual Studio folder,

something like: C: \ Program Files \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ PublicAssemblies

or Windows 7 64 bit C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ PublicAssemblies

+6
source share

I got a similar error at ssrs-2005.

Just copy your dll manually to the following report server folder: "C: \ Program Files \ Microsoft SQL Server \ MSSQL.2 \ Reporting Services \ ReportServer \ bin" and everything should work fine.

+1
source share

You may need to add links to assemblies that link to MyFile itself. So, if MyFile refers to System.IO, for example, you may need to add this dll link to the report.

0
source share

For those who have problems with custom dlls that import System.Data.SqlClient, I found the following tip absolutely necessary in the rssrvpolicy.config file:

Short and dirty answer: change the PermissionSetName attribute from Execution to FullTrust for CodeGroup Report_Expressions_Default_Permissions.

I hope this helps someone.

0
source share

All Articles