Re: Compile simple C# example in Web Matrix
jason_at_catamaranco.com
Date: 12/12/04
- Next message: Tor Bådshaug: "Re: FxCop rookie question"
- Previous message: Tampa .NET Koder: "RE: How do multi columns like newspaper?"
- In reply to: jason_at_catamaranco.com: "Re: Compile simple C# example in Web Matrix"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 12 Dec 2004 15:51:30 -0500
Ok, I figured it out.
To compile the simple howdy, cs one would do the following:
1. Run | Command Prompt
2. CD\ to your DIR containing file
3. Use following statement:
csc /t:library howdcy.cs
However, I was getting the following error (Please see:
http://www.communitymx.com/kbase.cfm?cid=1033)
csc' is not recognized as an internal or external command, operable program
or batch file.
or
'vbc' is not a recognized as an internal or external command, operable
program or batch file.
To work around this issue, you must place the path of the command line tools
into the Path system variable. To do so:
1.. Open the System Properties dialog from the Control Panel, or by right
clicking on My Computer and choosing Properties, or by pressing [windows
key] + [Pause/Break]
2.. Click on the Advanced tab, and click the Environment Variables
3.. Highlight the System Variable Path and click edit
4.. Append the paths to the command line tools to the existing value
By default, those paths are:
c:\program files\microsoft visual studio
.NET\FrameworkSDK\BIN;c:\windows\microsoft.net\framework\v1.1.4322 - if you
installed the SDK with Visual Studio, if you installed only the framework,
the path would likely be:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
If you'd like more information on using the command line compiler, see the
article:
Demystifying .NET Compilers
http://www.communitymx.com/abstract.cfm?cid=A9938E090C326799
<jason@catamaranco.com> wrote in message
news:%23CC9rOI4EHA.1392@tk2msftngp13.phx.gbl...
> Awesome! I did as intructed and downloaded the SDK and read through the
sdk
> including the 'tools' section.
>
> However, I still don't see any refeence to the C# compiler...where is this
> tool?
>
> Many thanks
> Jason
>
> "V. Jenks" <anonymous@discussions.microsoft.com> wrote in message
> news:12c901c4dfc8$b6433e90$a401280a@phx.gbl...
> I've never used web matrix but as I understand it, it is an
> asp.net development IDE, not made for compiling console
> apps. Correct me if I'm wrong.
>
> Take this modified version of your code:
>
> //BEGIN CODE----------------------------
>
> using System; //added System namespace!
>
> namespace TestClass //added custom namespace!
> {
> // Program start class
> public class HowdyPartner
> {
> // Main begins program execution
> public static void Main(string[] args) //added args!
> {
> // Write to console
> System.Console.WriteLine("Howdy, Partner!");
> }
> }
> }
>
> //END CODE------------------------------
>
> Paste it into notepad and save it as "HowdyPartner.cs"
> (without quotes - and make sure extention is ".cs" not ".txt")
>
> Compile it from the command-line using the C# compiler (csc).
>
> http://www.publicjoe.f9.co.uk/csharp/cs04b2.html
>
> You must have the .net SDK installed, get it here if you
> don't already have it:
>
>
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b3a2ca6-3647-4070-9f41-a333c6b9181d&displaylang=en
>
> And off you go!
>
> -v
>
> >-----Original Message-----
> >I am trying to compile a simple c# class in Web Matrix
> called howdy.cs:
> >
> >
> > // Program start class
> > public class HowdyPartner
> > {
> > // Main begins program execution
> > public static void Main()
> > {
> > // Write to console
> > System.Console.WriteLine("Howdy, Partner!");
> > }
> > }
> >
> >However, it appears the 'Start' option is not available.
> What can I do to
> >simply compile this class?
> >
> >I have heard there is a compiler in the SDK but I would
> have thought that
> >would have been downloaded with WebMatrix or the .NET
> framework which is
> >installed on my windowx xp machine.
> >
> >Appreciate some guidance to get my first pathetic C# class
> up and running :)
> >
> >Many thanks
> >Jason
> >
> >
> >.
> >
>
>
begin 666 spacer.gif
K1TE&.#EA`0`!`( ``/_______R'Y! 44````+ `````!``$```("1 $`.P``
`
end
- Next message: Tor Bådshaug: "Re: FxCop rookie question"
- Previous message: Tampa .NET Koder: "RE: How do multi columns like newspaper?"
- In reply to: jason_at_catamaranco.com: "Re: Compile simple C# example in Web Matrix"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|