Reputation: 20224
I deploy my WebAPI project to IIS.
I added a reference to ReportViewer.WebForms and ReportViewer.Commons, both with "Local Copy=True".
When I try to create a "local report" using ReportViewer class, I get the following error message:
Die Datei oder Assembly "Microsoft.ReportViewer.ProcessingObjectModel, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" oder eine Abhängigkeit davon wurde
nicht gefunden. Das System kann die angegebene Datei nicht finden.
I had the very same error, just with Commons, when I forgot to add Commons to the references list. My problem is that I can't add this reference, for I don't find ProcessingObjectModel in the list of references.
What shall I do?
Upvotes: 0
Views: 155
Reputation: 3820
Whilst I'm not familiar with the ReportViewer namespace, it looks to me like the assembly Microsoft.ReportViewer.ProcessingObjectModel.dll is missing from your bin/ folder.
This is probably due to it being a dependency of either ReportViewer.WebForms or ReportViewer.Commons, but not a direct dependency of your Web API application.
Try adding the special folder _bin_deployableAssemblies to your Web API project and putting Microsoft.ReportViewer.ProcessingObjectModel.dll in there. Open it's properties and set the "Build Action" to None. When you build it should then automatically get copied over to bin/.
Alternatively you could just reference it from your app, but this is a bit of a hack.
Upvotes: 1