Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS 2008, custom dll, file not found

Tags:

ssrs-2008

I've been fighting with SSRS now for a while and it's beyond silly. When I add a reference to a dll (which is part of the same solution) it gives me nothing but a

[rsErrorLoadingCodeModule] Error while loading 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 file specified.

I've tried hitting the solution config to tell it debug source is in other locations, copying the file to about 50 different locations (not gac, not possible), running Visual Studio 2008 as admin, all the goofy stuff you can think of ... nothing, same error everytime.

Any ideas?

like image 201
jeriley Avatar asked Feb 14 '11 17:02

jeriley


2 Answers

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

Putting it in the SQL Server Bin folder is for the server. for DEVELOPMENT put a 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

like image 183
usarian Avatar answered Oct 15 '22 15:10

usarian


I got a similar error on ssrs-2005.

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

like image 45
dcarneiro Avatar answered Oct 15 '22 16:10

dcarneiro