470,628 Members | 2,316 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,628 developers. It's quick & easy.

Compile Questions

I am trying to teach myself how to compile my application at the command line
with the csc.exe. I found a good article which steps you through the
process, but I have some questions, which I hope someone can elighten me
on....

1. In VS2005, I found an article about how VS2005 is using a new tool
called "MSBuild" to do compiles. Does this mean that csc.exe is being
replaced and I really should be learning this new tool?

2. Strong Names - The example showed you how to use a utility to create a
"strong name" and utilize this as a compile option. What does this do for
me? It seems that the /keyFile would not accept a path which was on another
drive, maybe I did something wrong, but I had to move the .snk file into the
same directory where I was doing the compile. I was compiling from the c:
prompt, but all my code and references were on another drive.

3. I'm confused as to when to create a ".netModule" or a ".dll" file. Why
would I create one vs. the other.

Thanks in advance for your assistance!!
May 10 '07 #1
1 1253
See inline:
1. In VS2005, I found an article about how VS2005 is using a new tool
called "MSBuild" to do compiles. Does this mean that csc.exe is being
replaced and I really should be learning this new tool?
MSBuild is a build system, not the actual program that performs the
compilations. csc.exe is still the executable which does the actual
compilation. With MSBuild, you have project files (xml based) which have
items (various files and types) which are then processed by tasks (there is
a CSC task which does compilation for C#). There is much more to this, but
that's a high-level overview. The MSBuild engine will take the project
items, pass them to the CSC task, which will create the command line for
running csc.exe, etc, etc.
2. Strong Names - The example showed you how to use a utility to create a
"strong name" and utilize this as a compile option. What does this do for
me? It seems that the /keyFile would not accept a path which was on
another
drive, maybe I did something wrong, but I had to move the .snk file into
the
same directory where I was doing the compile. I was compiling from the c:
prompt, but all my code and references were on another drive.
You should use a full path for the /keyFile switch. A strong name key
allows you to create strong named assemblies. You can find a good
description of strong-named assemblies here:

http://msdn2.microsoft.com/en-us/library/wd40t7ad.aspx
3. I'm confused as to when to create a ".netModule" or a ".dll" file.
Why
would I create one vs. the other.
An assembly is a set of 1-N netmodules. Netmodules have code and
implementation in them, but no manifest. An assembly has a manifest which
details the contents of the assembly and subsequent netmodules. An
advantage of a netmodule is that you can create netmodules in various
languages (perhaps leveraging the benefits of one language in one module and
another language in another module) and then combine them into one assembly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
May 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by edward hage | last post: by
5 posts views Thread by xuatla | last post: by
5 posts views Thread by Carmine Cairo | last post: by
52 posts views Thread by entropy123 | last post: by
8 posts views Thread by farseer | last post: by
30 posts views Thread by David T. Ashley | last post: by
6 posts views Thread by cyberhacker665 | last post: by
1 post views Thread by brianrpsgt1 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.