Article View: borland.public.csharpbuilder.language.csharp
Article #344Re: Compiling to EXE succeeds but not to DLL
From: Joe Mayo
Date: Fri, 02 Sep 2005 19:22
Date: Fri, 02 Sep 2005 19:22
50 lines
2215 bytes
2215 bytes
Hi Terentius,
You need to add a reference to the physical assembly that Logger belongs to.
You should be able to go to the project, right-click, and select Add
Reference.
Joe
--
http://www.csharp-station.com
"Terentius Neo" <unknown@user.domain> wrote in message
news:4315d8cc@newsgroups.borland.com...
>
> I have two classes, A and B, both in the same namespace. If I compile
> files to a DLL, the A class does not compile. The error message is
>
> "[C# Error] BaseObject.cs(69): The type or namespace name 'Logger' could
> not be found (are you missing a using directive or an assembly
> reference?)"
>
> Note: there *is* using clause. If I compile both as part of the same EXE
> there is no problem. The code is the same!
>
> Here are the relevant parts of the code:
>
> Class A:
> ==========
> using COM.ISADGBase.Objects;
>
> namespace COM.ISADGBase.Objects
> {
> public abstract class BaseObject : IDescLevel {
> //THE NEXT LINE DOES NOT COMPILE:
> protected internal Logger log;
> }
> }
>
> Class B;
> ==========
> using COM.ISADGBase.Objects;
>
> namespace COM.ISADGBase.Objects
> {
> public class Logger
> {
> }
> }
>
> With best regards
> Terentius
Technical Details
Message-ID:
<4318a626$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4315d8cc@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,abfc33e24e41b519 X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Joe Mayo" <jmayo@nospamAtCSharpDashStation.com> Newsgroups: borland.public.csharpbuilder.language.csharp References: <4315d8cc@newsgroups.borland.com> Subject: Re: Compiling to EXE succeeds but not to DLL Date: Fri, 2 Sep 2005 13:22:01 -0600 Lines: 52 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 64.135.165.189 Message-ID: <4318a626$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1125688870 64.135.165.189 (2 Sep 2005 12:21:10 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail