Iron Speed Technical Forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
wyldKard

Avatar / Picture

Registered:
Posts: 62
Reply with quote  #1 
Hi folks,

Been having issues with Compiler Error CS0246: The type or namespace name 'type/namespace' could not be found (are you missing a using directive or an assembly reference?) lately. I'm adding iTextSharp (and after any other pdf editing library) to my app to edit pdf forms. During compilation the error appears and I've tried changing the project's target framework to be the same with itext sharp's which is .Net 4.0, but still the same problem. I've used iTextSharp in previous ISD versions and haven't experienced this kind of problem. Also tried working on a different pc and os but no improvements so far. Would appreciate any info/solutions if anyone has encountered this headache inducing issue.

Regards,
Dave
miles

Avatar / Picture

MVP Consultant
Registered:
Posts: 1,706
Reply with quote  #2 
You need to add an assembly directive for iSharp to the Page Directives area in your ISD page.  

The easiest way to figure out what that is, is to load Visual Studio and create a standard asp.net web form page. Then add thye iSharp control to it.  Switch to Source view on the page, and at the top of the page you will see something similar to this:

<%@ Register Assembly="DevExpress.Web.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

Copy your directive over to your Iron Speed page in the Page Directives area and Save.  Build and you should be good to go.

HTH,

__________________
Miles Gibson, MScIS
Iron Speed MVP
Senior Consultant, Principal
Milestone Software Inc.

http://www.ironspeedmvp.com\localizer 
Email: miles@milestone.ca
Milestone Localizer: Full Localization for your Iron Speed applications!
wyldKard

Avatar / Picture

Registered:
Posts: 62
Reply with quote  #3 
Thanks for the tip on the page directives!

Now i'm wondering how to create the sample page directive. The .dll file is being added in the references folder but can't find a control that can be added directly to the page to create the new page directive. Is there an alternative way of creating the page directive? I tried creating it manually but it didn't work. I'm also digging for some code/web app samples using the iTextSharp reference just in case I can find a sample page directive.

Regards, 
Dave
miles

Avatar / Picture

MVP Consultant
Registered:
Posts: 1,706
Reply with quote  #4 
Does it compile in Visual Studio?
__________________
Miles Gibson, MScIS
Iron Speed MVP
Senior Consultant, Principal
Milestone Software Inc.

http://www.ironspeedmvp.com\localizer 
Email: miles@milestone.ca
Milestone Localizer: Full Localization for your Iron Speed applications!
wyldKard

Avatar / Picture

Registered:
Posts: 62
Reply with quote  #5 
It runs from vs. but when i login to the app i get this screen

servererror.png

miles

Avatar / Picture

MVP Consultant
Registered:
Posts: 1,706
Reply with quote  #6 
delete your temporary asp.net subfolders. This error doesn't appear to be related to the iSharp .dll error... Can you navigate to other pages?
__________________
Miles Gibson, MScIS
Iron Speed MVP
Senior Consultant, Principal
Milestone Software Inc.

http://www.ironspeedmvp.com\localizer 
Email: miles@milestone.ca
Milestone Localizer: Full Localization for your Iron Speed applications!
wyldKard

Avatar / Picture

Registered:
Posts: 62
Reply with quote  #7 
apologies, i forgot i changed from using the iText.dll file to Spire.PDF a few days after posting the original thread because at first i thought the problem was with the new itext sharp version (although i have this an older version of the library along with an older version of ISD and it worked)

Here's the compile error on ISD side:

isdcompile.png 

the code that i points to is this:

cs0234.png 

also deleted the temporary asp.net files and still the same thing. i can also navigate to my other pages by typing on the urls manually.

ps. the same error and point to the using statements happened too while using itextsharp.

regards,
Dave

miles

Avatar / Picture

MVP Consultant
Registered:
Posts: 1,706
Reply with quote  #8 
try adding the Spire DLL as a reference in Visual Studio, then recompile.
What happens?

__________________
Miles Gibson, MScIS
Iron Speed MVP
Senior Consultant, Principal
Milestone Software Inc.

http://www.ironspeedmvp.com\localizer 
Email: miles@milestone.ca
Milestone Localizer: Full Localization for your Iron Speed applications!
wyldKard

Avatar / Picture

Registered:
Posts: 62
Reply with quote  #9 
Spire.Pdf.dll is already in the reference during the last screenshot i send

reference.png 

wyldKard

Avatar / Picture

Registered:
Posts: 62
Reply with quote  #10 
Hi again, 

So this is starting to become weird. I was messing around with the idea of just using crystal reports instead of going the edit pdf route.  Compiling also gave me the cs0246 error:

crystal.png 

Now I'm wondering if I'm doing something wrong in general. Created the cryst al report by opening the VS from ISD, and used code customization for adding the report. All Crystal reports libraries are in the reference and I also tried adding the page directive. Same problem. Getting stumped about this.

miles

Avatar / Picture

MVP Consultant
Registered:
Posts: 1,706
Reply with quote  #11 
your web.config can also be part of the problem/solution.  That is why I suggest adding a third party control to a native webform page, that will add any missing directives to web.config.  Otherwise contact the vendor on how to integrate their control into a standard webform.
__________________
Miles Gibson, MScIS
Iron Speed MVP
Senior Consultant, Principal
Milestone Software Inc.

http://www.ironspeedmvp.com\localizer 
Email: miles@milestone.ca
Milestone Localizer: Full Localization for your Iron Speed applications!
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Download Iron Speed Designer

Terms of Service Privacy Statement