472,789 Members | 1,363 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 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 13885
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: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?

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.