Right click and then 'Add Existing Item'. Answer courtesy of @Savanna King.
How do I reference a namespace in another .cs file?
-
04-07-2023 - |
문제
So I'm for one of my own .cs files, I'm trying to use the TestPDF Namespace from the last post here:
http://forums.asp.net/t/1886131.aspx?Convert+HTML+to+PDF+using+iTextSharp
which is contained within HTMLToPDFBuilder.cs. So for my someFile.cs I try to use the TestPDF namespace with using TestPDF;
However, it says
The type/namespace could not be found [...]
How do I add a directive/assembly reference to this namespace within the file? I'm using VS2013 and tried right clicking my project stub in the solution and did Add>Reference, but it only takes .dll-esque file extensions, not .cs ones.
해결책 2
다른 팁
Add your DLL to your references library, if you still get this error then CLEAN your solution then REBUILD.
제휴하지 않습니다 StackOverflow