PC Review


Reply
Thread Tools Rate Thread

Compile Questions

 
 
=?Utf-8?B?T2xkQnV0U3RpbGxMZWFybmluZw==?=
Guest
Posts: n/a
 
      10th May 2007
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!!
 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      10th May 2007
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]
- (E-Mail Removed)


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bookmark questions Access/Word Error Message Two Questions Kenny G Microsoft Access Form Coding 0 1st Aug 2008 04:11 PM
Compile versus not compile (VS 2005)?? stupid48@gmail.com Microsoft ASP .NET 1 11th Apr 2008 09:24 PM
Re: After the Deletion of Google Answers, U Got Questions Fills the Gap Answering and Asking the Tough Questions sechumlib Microsoft C# .NET 0 7th May 2007 07:35 PM
VBAProject name compile error, not defined at compile time Matthew Dodds Microsoft Excel Programming 1 13th Dec 2005 07:17 PM
can i fine tune VS.Net compile/ use parallel process when compile? norton Microsoft Dot NET 0 1st May 2004 07:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:59 PM.