C# compiler and windows directory

  • Thread starter Thread starter Abhishek Srivastava
  • Start date Start date
A

Abhishek Srivastava

Hello All,

Many people ask this question. I have installed .Net framework I wrote a
program but I can't find csc.exe. I have to tell them that it is inside
windows directory. But I myself don't understand what is the csc.exe
compiler doing over there. Why is the C# compiler in the windows
directory? Is the compiler a part of windows? or is windows os is a part
of the compiler.

Why can't it be in its own directory? (like all other compilers do?).

regards,
Abhishek.
 
It's not in the WINDOWS directory
It's in the Windows\Microsoft.NET\Framework\v.1.0.3705 (framework 1.0)
and/or v.1.1.4322 (framework 1.1).
Or WinNT\....

csc.exe is part of the framework, and the framework home directory is
v.1.0... or v.1.1...

You will find a whole bunch of other files there too.
 
Hello Morten,
It's not in the WINDOWS directory

Let me rephrase my question.
Why is the "Microsoft.NET\Framework\v.1.0.3705" directory under windows?
(or whereever your WINDIR variable points to. c:\WinNT for example)

What is the rational behind keeping it there and not under "Program Files"
You will find a whole bunch of other files there too.
Yes I know... but "why" are those files there.

Going by Common sense all the subdirectories under the Windows
(%WINDIR%) directory are in some way related to the OS functionality.
application specific files should not be present there. (Microsoft
themselves said this in TECH ED)

Yet the C# compiler seems to break this.

I just want to know if there is some special undocumented reason for
this? Or just vanilla old habit of dumping things in %WINDIR%
(c:\windows in my case).

regards,
Abhishek.
 
Hello Morten,


Let me rephrase my question.
Why is the "Microsoft.NET\Framework\v.1.0.3705" directory under windows?
(or whereever your WINDIR variable points to. c:\WinNT for example)

What is the rational behind keeping it there and not under "Program
Files"

Ah, my guess is that the framework is in the alley with dll files and other
system files, and therefore would be under windows instead of program files
which is far less secure in terms of accidentally deleting stuff.
Yes I know... but "why" are those files there.

Going by Common sense all the subdirectories under the Windows (%WINDIR%)
directory are in some way related to the OS functionality.
application specific files should not be present there. (Microsoft
themselves said this in TECH ED)

Yep, framework is tightly tied to the OS.
Yet the C# compiler seems to break this.

I just want to know if there is some special undocumented reason for
this? Or just vanilla old habit of dumping things in %WINDIR% (c:\windows
in my case).

I don't know. Though there might be the odd chance that Microsoft
considers the framework tools to be too complicated or not something
everyone should use and therefore hides it. Then again, csc.exe etc are
framework tools and all the windows tools seem to be in some directory
under %WINDIR%.

But you are right. I also think the developer tools should be found under
Program Files. It's a bloody annoyance to traverse to
C:\Windows\Microsoft.NET\Framework\v1.1.4233 (since I'm too lazy to add a
path to it ;)
 
Abhishek Srivastava said:
Hello Morten,


Let me rephrase my question.
Why is the "Microsoft.NET\Framework\v.1.0.3705" directory under windows?
(or whereever your WINDIR variable points to. c:\WinNT for example)

What is the rational behind keeping it there and not under "Program Files"

Yes I know... but "why" are those files there.

Going by Common sense all the subdirectories under the Windows
(%WINDIR%) directory are in some way related to the OS functionality.
application specific files should not be present there. (Microsoft
themselves said this in TECH ED)

Yet the C# compiler seems to break this.

I just want to know if there is some special undocumented reason for
this? Or just vanilla old habit of dumping things in %WINDIR%
(c:\windows in my case).
I think the framework is an OS component. With Longhorn I suspect we'll see
actual OS services using it, but it is a component as much as the win32 api
or a number of other libraries are.

I imagine the compiler is there because a) its probably easier on you to
have it in there, as any references it may have to other framework code will
resolve properly, b) it may well provide the managed csharp components or
pieces of those components to the framework(if anyone knows for sure, please
post).
 
Back
Top