473,695 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Command Line Compiler, CS0116: A namespace does not directly contain members such as fields or methods

My "VIS" Website, which is a C# site created in VS.NET, Framework 1.1,
is no longer compiling for me via the command line.

As I have done 600 times in the last year and a half, I can compile to
VIS.DLL via Visual Studio, with no problems:

------ Rebuild All started: Project: VIS,
Configuration: Debug .NET ------
Preparing resources...
Updating references...
Performing main compilation...

Build complete -- 0 errors, 0 warnings
Building satellite assemblies...
---------------------- Done ----------------------
Rebuild All: 1 succeeded, 0 failed, 0 skipped
However (as I have done 200 times in the last year and a half!!) I am
suddenly unable to compile from the command line:
>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>> >

Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

Admin\_vti_cnf\ AdminMenu.aspx. cs(1,1): error CS0116: A namespace does
not directly contain members such as fields or methods
Admin\_vti_cnf\ dsRatesByLocati on.cs(1,1): error CS0116: A namespace
does not directly contain members such as fields or methods
Admin\_vti_cnf\ dsRatesByMOU.cs (1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
Admin\_vti_cnf\ dsRatesByPXPID. cs(1,1): error CS0116: A namespace does
not directly contain members such as fields or methods
............. Yadda yadda yadda [every single file is listed,
same error, same "line, char" of (1,1) .......
Volunteer\_vti_ cnf\xt_Status.a spx.cs(1,1): error CS0116: A namespace
does not directly contain members such as fields or methods
Volunteer\_vti_ cnf\xt_Voluntee r.aspx.cs(1,1): error CS0116: A namespace
does not directly contain members such as fields or methods
_vti_cnf\Assemb lyInfo.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\authen ticate.aspx.cs( 1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\authen tication_unused .cs(1,1): error CS0116: A namespace does
not directly contain members such as fields or methods
_vti_cnf\defaul t.aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\Global .asax.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\indexO SA.aspx.cs(1,1) : error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\indexV ol.aspx.cs(1,1) : error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\LdapAu thentication.cs (1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\login. aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\logon. aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\VISAut h.aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
<<<<<<<<<<<<<<< <<<<<<<<<<<<<<< <<<<<<<<<<<<<<< <<<<<<<<

using this command:
csc /t:library /out:bin/VIS.dll /recurse:*.cs /nowarn:183 /lib:bin >
buildlog.txt

This is the same as I have always used.

Note that, obviously, none of my cs files suddenly have fields,
methods, or variables declared right below the namespace level! This
error must have something to do with the configuration of the
machine(s) on which I am trying to compile it. [[Right??]]. The "error"
shows up in the output of csc for every single file in the project.

Thanks for any help you can give.

Nov 17 '05 #1
5 14028
Genboy,

Why are you trying to compile the code in the "_vti_cnf" folder?
Eliminate that folder from your command-line build process and the
project should compile w/o problems.
Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 17 '05 #2
Thanks, Chris; I am not in the office to try this til Monday (although
I may make a special trip!). I actually don't know what the heck that
folder does anyway, nor how it suddenly cropped up. I'll do a bit of
research on that, and report back my results soon as I can. Thanks
again. -- Roy

Nov 17 '05 #3
As far as I can see, you recently started using FrontPage with this
site. FrontPage uses the _vti_cnf directories to hold the site publishing
infomation. Basically, within each folder in the site, FP creates a
sub-folder with "shadow" copies of each file in the parent folder --- files
with the same names but completely different contents as the files in the
parent.

So, when you say " /recurse:*.cs " you're telling it to try to compile
all the files, the good one *and* FP's fake ones. You will probably have to
more explicitly state with folders to compile.

--
--
Truth,
James Curran
[erstwhile VC++ MVP]

Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com

"Genboy" <ge*****@yahoo. com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
My "VIS" Website, which is a C# site created in VS.NET, Framework 1.1,
is no longer compiling for me via the command line.

As I have done 600 times in the last year and a half, I can compile to
VIS.DLL via Visual Studio, with no problems:

------ Rebuild All started: Project: VIS,
Configuration: Debug .NET ------
Preparing resources...
Updating references...
Performing main compilation...

Build complete -- 0 errors, 0 warnings
Building satellite assemblies...
---------------------- Done ----------------------
Rebuild All: 1 succeeded, 0 failed, 0 skipped
However (as I have done 200 times in the last year and a half!!) I am
suddenly unable to compile from the command line:
>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>> >

Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

Admin\_vti_cnf\ AdminMenu.aspx. cs(1,1): error CS0116: A namespace does
not directly contain members such as fields or methods
Admin\_vti_cnf\ dsRatesByLocati on.cs(1,1): error CS0116: A namespace
does not directly contain members such as fields or methods
Admin\_vti_cnf\ dsRatesByMOU.cs (1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
Admin\_vti_cnf\ dsRatesByPXPID. cs(1,1): error CS0116: A namespace does
not directly contain members such as fields or methods
............. Yadda yadda yadda [every single file is listed,
same error, same "line, char" of (1,1) .......
Volunteer\_vti_ cnf\xt_Status.a spx.cs(1,1): error CS0116: A namespace
does not directly contain members such as fields or methods
Volunteer\_vti_ cnf\xt_Voluntee r.aspx.cs(1,1): error CS0116: A namespace
does not directly contain members such as fields or methods
_vti_cnf\Assemb lyInfo.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\authen ticate.aspx.cs( 1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\authen tication_unused .cs(1,1): error CS0116: A namespace does
not directly contain members such as fields or methods
_vti_cnf\defaul t.aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\Global .asax.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\indexO SA.aspx.cs(1,1) : error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\indexV ol.aspx.cs(1,1) : error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\LdapAu thentication.cs (1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\login. aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\logon. aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\VISAut h.aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
<<<<<<<<<<<<<<< <<<<<<<<<<<<<<< <<<<<<<<<<<<<<< <<<<<<<<

using this command:
csc /t:library /out:bin/VIS.dll /recurse:*.cs /nowarn:183 /lib:bin >
buildlog.txt

This is the same as I have always used.

Note that, obviously, none of my cs files suddenly have fields,
methods, or variables declared right below the namespace level! This
error must have something to do with the configuration of the
machine(s) on which I am trying to compile it. [[Right??]]. The "error"
shows up in the output of csc for every single file in the project.

Thanks for any help you can give.

Nov 17 '05 #4
Well, I was thinking of ditching VS for FrontPage. But Intellisense
doesn't seem to be working!

;-)

Maybe someone tried changing the access type from File Share to FP and
back. Who knows.

Thanks for the explanation though --

RS

Nov 17 '05 #5
That was indeed the problem. Some well-meaning dunderhead trying to fix
a VSS problem re-installed FrontPage Server Extensions on the dev
server. It created a _vti_cnf folder, with copies of source files,
under every subdir in my project. When I tried to compile (recursively
nabbing all C# files), all the _vti folders and code got added, so
every namespace showed up twice.

It became clear along the way that CS0116 is a fairly generic error
message.

Thanks for the help, I owe the solution to Mr. Timmons and those of you
who replied.

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2720
by: John L. Clark | last post by:
I am curious as to the rationale, and effect, of having default namespaces not applying (directly) to attributes (see http://www.w3.org/TR/REC-xml-names/#defaulting). Given an attribute without a namespace prefix, what is its namespace, if default namespaces do not apply? Are (either of) prefixed or non-prefixed attributes correct? For example, are the following equivalent: <html:br class="foo"...
12
1851
by: scott | last post by:
Is there a way to prevent IE from forcing a line break? Below in LISTING 2, you notice the table background image extention of '.jpg' begins a new line, instead of staying on the same line as it's file name. Same happens with my javascript onclick event, IE forces a line break and breaks my code. In my asp code, you notice I'm inserting line breaks, but IE seems to do what it wants. I should note, the below HTML results is actually 1 table...
3
1827
by: Dharma | last post by:
Hello, I am trying to compile this "hello world" program but it gives me this following error, "A namespace does not directly contain members such as fields or methods" Can someone pelse help me with this? Here's my code: Using System; namespace Helloworld {
4
1258
by: Ben R. Bolton | last post by:
I have two projects each with a different namespace. The first defines an interface with two methods. namespace SWPStandards { public interface ISWPDisplayMessage
19
3571
by: Martin Oddman | last post by:
Hi, I have a compiling problem. Please take a look at the code below. I have an application that is built upon three tiers: one data tier (Foo.DataManager), one business tier (Foo.Kernel) and one web presentation tier (Foo.WebFiles). The data tier shall only be accessible thru the business tier so I do NOT want a reference to the data tier in the presentation tier. In the business tier I have a class with the name CategoryItem that...
6
1467
by: Todd A | last post by:
If I use the following in my code behind page: Public Class _Default Inherits System.Web.UI.Page The page will compile with no errors from the command line compiler (vbc.exe) But, If I insert my own base page to inherit from, say,
1
1161
by: Mark Denardo | last post by:
Ok here's my problem: I have a bunch of Classes at the same namespace level say "abc.xyz". And all Classes reside in different files. abc.xyz.Class1 (in Class1.vb) abc.xyz.Class2 (in Class2.vb) abc.xyz.Class3 (in Class3.vb) .... abc.xyz.Class99 (in Class99.vb)
11
11160
by: Raja Chandrasekaran | last post by:
Hai folks, I have a question to get exact answer from you people. My question is How Static class is differ from instance class and If you use static class in ASP.NET, ll it affect speed or performance of site...? Because I am using static class in my Database layer. But one of my friend told me that "static class ll take more space than instance class and it ll affect the performance. But if you use Instance class
2
4242
by: william.w.oneill | last post by:
I have an application that takes a few command line parameters. As recommended by others in this group, I'm using a named mutex to ensure that only one instance of the application is running. My question is how to elegantly pass a command line parameter from Instance_B to Instance_A where Instance_A was running prior to Instance_B. For example, the user can launch the program by passing a file name as a command line argument. The program...
0
8617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8553
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8822
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8815
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6483
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4332
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4570
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2994
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.