🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #339

Compiling to EXE succeeds but not to DLL

#339
From: Terentius Neo
Date: Wed, 31 Aug 2005 16:21
37 lines
1732 bytes
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: <4315d8cc@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!peer01.west.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,abfc33e24e41b519,start
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 31 Aug 2005 19:21:13 +0300
From: Terentius Neo <unknown@user.domain>
User-Agent: Mozilla Thunderbird 1.0.5 (Windows/20050711)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.csharpbuilder.language.csharp
Subject: Compiling to EXE succeeds but not to DLL
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 80.221.176.228
Message-ID: <4315d8cc@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1125505228 80.221.176.228 (31 Aug 2005 09:20:28 -0700)
Lines: 37
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!peer01.west.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail