473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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\dsRatesByLocation.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.aspx.cs(1,1): error CS0116: A namespace
does not directly contain members such as fields or methods
Volunteer\_vti_cnf\xt_Volunteer.aspx.cs(1,1): error CS0116: A namespace
does not directly contain members such as fields or methods
_vti_cnf\AssemblyInfo.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\authenticate.aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\authentication_unused.cs(1,1): error CS0116: A namespace does
not directly contain members such as fields or methods
_vti_cnf\default.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\indexOSA.aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\indexVol.aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\LdapAuthentication.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\VISAuth.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 13982
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.googlegr oups.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\dsRatesByLocation.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.aspx.cs(1,1): error CS0116: A namespace
does not directly contain members such as fields or methods
Volunteer\_vti_cnf\xt_Volunteer.aspx.cs(1,1): error CS0116: A namespace
does not directly contain members such as fields or methods
_vti_cnf\AssemblyInfo.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\authenticate.aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\authentication_unused.cs(1,1): error CS0116: A namespace does
not directly contain members such as fields or methods
_vti_cnf\default.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\indexOSA.aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\indexVol.aspx.cs(1,1): error CS0116: A namespace does not
directly contain members such as fields or methods
_vti_cnf\LdapAuthentication.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\VISAuth.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
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...
12
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...
3
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...
4
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
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...
6
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...
1
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...
11
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...
2
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.