Adding a referance:???

vinnie881

Well-known member
Joined
Sep 3, 2006
Messages
152
Programming Experience
3-5
I am trying to add a referance to
[FONT=Verdana, Arial, Helvetica, sans-serif]
Microsoft.ReportingServices.Interfaces.dll

This file is located in about 10 different locations on my computer. According to microsoft, and various articles online, this file should be able to be added as a referance w/o issues. But when I try I get the following error

A reference to 'C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\Bin\
[/FONT][FONT=Verdana, Arial, Helvetica, sans-serif]Microsoft.[/FONT][FONT=Verdana, Arial, Helvetica, sans-serif]ReportingServices.Interfaces.dll'
could not be added. This is not a valid assembly or COM Component. Only assemblies with the extension .dll and COM components can be refernced. Please make sure that the file is accessible, and that it is a valid assembly or COM component.

I am using a Evaluation version of Microsoft SQL 2005 Server and the Reporting Services, which is what this API is from, but do you think that is the issue? I would assume that I should still be able to add the refernce like microsoft claims w/o issue.

Thanks

[/FONT]
 
You shouldn't be adding a reference to the library directly. You would have to either find the component you want to reference on the .NET or COM tab of the Add Reference dialogue. If a library is not available on either of those tabs then Microsoft do not intend for you to reference it directly.

When you create your own libraries or get them from other small time developers then you may have to add references directly to the DLL file, but all Microsoft assemblies that you can reference will be installed in the GAC, thus appear on the .NET tab.
 
I would normally agree with you, but in the step by step directions posted on microsofts website, it specifically states to add that reference.

Please see.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ufairs.asp

I quote the article
  1. On the Project menu, click Add Reference.
  2. The Add References dialog box opens.
  3. Click the .NET tab.
  4. Click Browse, and navigate to find Microsoft.ReportingServices.Interfaces on your local drive. By default, the assembly is located in the <install>\ReportServer\bin directory. Click OK. The selected reference is added to your project.
Please advise.
 
That article does say that it is for use with SQL Server 2000, so it's possible things have changed since then. However it's only a reference you are trying to add it should really make no difference. There are many articles on the web and you are correct, they all specify that it should be added from that location. It could be the fact that yuo areusing an evaluation edition, you could always download the express edition and try that.
 
If you feel it will work, I will, but I have extracted that file from my sql2000 instance too running on the same machine which isnot a evaluation, and I am still having the error. If Microsoft provides that file for individual download.

I'm stumped... Any other sugestions would be appriciated.
 
This is just one programmers idea, i have to say it would be a bit of a long shot. Have you tried adding the reference from a different project, say a class library project. Don't ask me why that should make a difference but in cases like these anything is worth a try.
The only time i've heard of people having problems with this .Dll is that they don't always realise that there are some compulsory interfaces that have to be implemented.
 
I tried to reply to this thread earlier but my system was playing up. I was going to say that maybe the issue was that the library was for a different Framework version or something like that. Unfortunately I don't have a full version of SQL Server so I can't test things myself.
 
SRS does run on .net 2.0, while vs.net 2003 is 1.xx framework. Do you think this can be the issue?? If the framework does not match, will .net not recognize it as a component? I think Jmcilhinney may have the best chance of being correct. If this is the case, how do I make it work (Buy vs.net 2005)? What's everyones opinion??
 
My first suggestion would be to change your profile so it doesn't say that you're using .NET 2.0.

If that library you're trying to reference is .NET 2.0 then a .NET 1.x project will not recognise it, which would produce exactly the error message you're getting.
 
Back
Top