Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2004, 03:11 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default Compile Shortcut?

I am pretty new to C#,
A few questions here.

I am able to compile code already at the command line doing something like the following:

C:\...>C:\WINDOWS\Microsoft.NET\Framework\v1.1.432 2\csc.exe G:\www\programming\hello.cs

1.)

The compiler creates the executable in a Documents and Settings folder, rather than the same directory as the .cs file. Is there a way to control where the executable is created?

2.)

Is there a shortcut to the above syntax.. in my book it reads
>csc <filename>

But that throws an error, csc not a valid command.. or something to that effect.
Of course it would be fantastic if I could not have the whole path to the csc.exe file! I tried to create a shortcut in C:\ at the root, but I guess it won't accept it.

And alas I do not have Visual Studio, nor the funds to invest in it!

3.)

When I run the compiled executable a blank command line window also pops up behind the window, is there a way to get rid of that?

Thanks in advance!
: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
 
Old January 16th, 2004, 12:47 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Rich,

You can eliminate the need to fully reference the csc.exe by adding the path to it in your system variables.
- My Computer -> Rightclick -> Properties
- Advanced Tab
- Environmental variables button
- System variables frame
- Find "PATH" -> Edit...
- Add a semi colon to the end if there isn't one
- Add "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\ ;"
- OK -> OK -> OK

Now you can open a new command prompt and just type "csc". If you call this from G:\www\programming\ you should get the output there as well, unless you have specified the output explicitly to fall somewhere else.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old January 16th, 2004, 06:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you're on windows 2000 or XP, you might want to add the path to your C# compiler to your "User environment variables" instead of the "System environment variables". Unless, of course, you're the only user on the system, then it doesn't matter much.

Anyway, you might want to take a look at this link:
  http://members.microsoft.com/partner...r/default.aspx

Basically, you promise to develop a windows product, and you get 5 MSDN Universal subscriptions, Win2k licenses, Office 2k licenses, and some other stuff. Recently added to the MSDN Subscription is Microsoft's newly-released Virtual PC, which allows you to boot other x86-based operating systems in an application window.

This means you can install several different versions or configurations of Windows (GREAT for testing various versions of the same web browser), Linux, DOS, and OS/2, all on your machine (as long as it's Windows 2000 or XP).

This is a similar product to the much more popular VMWare Workstation. Compare both:
  http://www.vmware.com/
  http://www.microsoft.com/windowsxp/virtualpc/


Total cost to join this program and get all those licenses and subscriptions? $375.

A single MSDN Universal subscription usually runs about 9 times that. What is an MSDN subscription? It's a service where you pay some annual fee, and (depending on the subscription level you pay for) you get CDs or DVDs periodically that contain:
* the latest versions of all Microsoft's developer documentation, including API docs, tutorials, magazine articles, etc...,
* Licenses for developer applications, such as Visual Studio 6.0 and .NET
* Licenses for operating systems (Win95, 98, NT, ME, 2000, and XP)
* Licenses for Office
* Licenses for SQL Server

etc.
  http://msdn.microsoft.com/subscriptions/

The normal cost of subscriptions make it somewhat difficult to justify the cost if you don't write and sell enough Windows applications to cover the cost of the subscription and still be profitable.

I think that the signup process for the $375 deal involves you giving Microsoft a *lot* of detailed information about your company, including finances and revenue. Many companies don't feel that it's worth $2500 in savings (the difference in cost of just 1 MSDN Universal subscription) to divulge all this potentially sensitive info to microsoft.

Shrug.


Take care,

Nik
http://www.bigaction.org/
 
Old January 16th, 2004, 07:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I should make something clear -- I said above that you "promise to develop a windows product". It is part of your contractual agreement that this promise be kept. You must have an official company home page, this product must be announced publically on that web page within 6 months of your subscription activation, and the product must be released within one year of your subscription activation.


I should also mention that I have not signed up for this program, nor am I suggesting that anyone do (or not do) so. I'm merely posting the above on a strictly FYI basis.


Take care,

Nik
http://www.bigaction.org/
 
Old January 16th, 2004, 08:29 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Planoie & Nik,

Thanks for the directions and advice.. you've given me a lot to ponder on. I'm thinking about swallowing my pride and dropping a hundred on Visual C# Basic. There seems to be a plethora of knowledge at the MSDN website, but nearly every C# book I've looked at seems geared to the Visual C# editor. And not towards the strictly by hand coder. And well it seems to have pretty good reviews at Amazon.

I'm simply amazed at how easy it is to get going in C# .NET.

That sounds like a good deal Nik, thanks for the information, I'll keep it in mind.. probably be something I would pursuit once I get a solid footing in C#. I can certainly see the benefits from a development standpoint.

: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
 
Old January 19th, 2004, 10:50 AM
Authorized User
 
Join Date: Nov 2003
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to KABay
Default

Another avenue to check out is to go to your local technical college, regular college or university and inquire about taking a course in C#. This would be a very worthwile jump-start for getting going in .NET and C3 in particular.

But more importantly ask if they have academic discounts for students. Schools in my area have an agreement with Microsoft that lets the student buy a full. non-expiring copy of Microsoft® Visual Studio® .NET Professional version 2003 (VB.NET. C#.NET, C++.NET, J#.NET and 1.1 of the Framework) for roughly $75.
 
Old January 19th, 2004, 02:49 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That's a fantastic idea, too. I wonder why I didn't think about it, since that's pretty much how I got all my MS apps. I was extremely fortunate in that Microsoft had some programming contest at my school, and anyone who enrolled got (for free):

  Windows 2000 Professional
  Visual Studio 6.0 Professional
  Embedded Toolkit for Visual C++

I never finished writing my PocketPC application, but my machine still runs the Win2k and Visual Studio that I got from them. =D


Even if you don't take a course in C#, you should be able to buy microsoft products at a significant educational discount if you're a student. If you're not a student, you probably know someone who is, and they can get the discount for you. =)


Take care,

Nik
http://www.bigaction.org/
 
Old January 19th, 2004, 02:58 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Fantastic idea guys.

I'm not a student but that got me thinking about who I know that is a student.

At IU or IU affiliated institutions one can obtain Microsoft software for a meger $5 per CD-ROM... that's how I obtained MS Office 2000 Professional... for $20 back when I was a student at IUPUI.. can't beat that!

: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::





Similar Threads
Thread Thread Starter Forum Replies Last Post
Form ShortCut mateenmohd Access 1 March 28th, 2008 07:48 AM
shortcut mateenmohd Other Programming Languages 2 February 20th, 2008 07:09 AM
use Shortcut keys slokhande C# 1 July 21st, 2006 09:45 AM
Shortcut keys! Dharam80 Access 2 August 18th, 2005 08:23 AM
Shortcut keys DARSIN General .NET 1 November 22nd, 2004 10:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.