1

I can normally use iTextSharp on local system. Actually there's a simple pdf file that i create with iTextsharp but when i deployed my application on server i am getting the following error:

Compiler Error Message: CS0246: The type or namespace name 'iTextSharp' could not be found (are you missing a using directive or an assembly reference?

I added an reference to iTextSharp.dll during the development of my project and it was working normally but don't know what's wrong with it when i run it on my web server. Has anybody experienced/fixed this problem? Below are my using statements:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using iTextSharp;
using iTextSharp.text;
using iTextSharp.text.pdf;
using System.Globalization;
jrummell
  • 42,637
  • 17
  • 112
  • 171
  • 1
    Is iTextSharp.dll in the bin folder on your web server? – jrummell Sep 25 '14 at 18:01
  • Yes, it is there. I said it is working on my local development server but not on production server when i deploy it – SaraWelfareOrg SWO Sep 25 '14 at 18:04
  • Any help please? My organization need this website running by next few hours. – SaraWelfareOrg SWO Sep 25 '14 at 18:10
  • Two words: "add reference". Surely, you've deployed third party libraries before? This is not a question related to iTextSharp (you have established that iTextSharp works on your own system). This is a question about deploying a third party library. It is a duplicate of [CS0246: The type or namespace name 'itextsharp' could not be found](http://stackoverflow.com/questions/17933553/cs0246-the-type-or-namespace-name-itextsharp-could-not-be-found) – Bruno Lowagie Sep 25 '14 at 18:24
  • I have added reference properly during the development stage and it is working on my local production server. The problem is when i deply my application it won't work. If i had not added reference, how could it be running on local server? Bruno Lowaigie – SaraWelfareOrg SWO Sep 25 '14 at 18:27
  • Because the configuration on your server is different. See for instance: http://stackoverflow.com/questions/18368126/build-error-are-you-missing-a-using-directive-or-assembly-reference-target-f – Bruno Lowagie Sep 25 '14 at 18:30
  • You may also want to read this: http://stackoverflow.com/questions/4512176/visual-studio-2010-are-you-missing-a-using-directive-or-an-assembly-reference – Bruno Lowagie Sep 25 '14 at 18:32
  • Thanks. i am checking your references – SaraWelfareOrg SWO Sep 25 '14 at 18:45

0 Answers0