Click to See Complete Forum and Search --> : ASP.NET assembly compilation


Crazy
10-22-2003, 02:41 PM
Hi all,

I'm reading a book on ASP.NET and one of the examples has this batch file:

set indir=C:\component\wroxauthors.cs
set outdir=C:\component\bin\wroxauthors.dll
set assemblies=System.dll,System.data.dll,System.Xml.dll

csc /t:library /out:%outdir% %indir% /r:%assemblies%
pause

Now I know this will compile the wroxauthors.cs file which will ouput the wroxauthors.dll component. However I don't know the purpose of this part:

set assemblies=System.dll,System.data.dll,System.Xml.dll

and this part:

/r:%assemblies%

I know the two parts are related but what do they do, and why is it necessary to do it?

Thanks.

PeOfEo
10-22-2003, 04:20 PM
what exactly is this code doing I mean what are you trying to accomplish, just create a dll on the fly? You are using c#?

Crazy
10-22-2003, 06:09 PM
Well using components in ASP.NET is the way developers are encouraged to develop, I'm creating a component which needs to be compiled into a dll before my aspx file can use it, the batch file does this compiling by executing the csc.exe compiler. However I didn't fully understand what those two parts did in the batch file, but now I do. Thanks for your reply but I've manage to work it out. Cheers.

jai
10-23-2003, 09:21 AM
This tells that it needs these system framework libraries to build your DLL.

The written by you is using these libraries. Open your project and go to the references you will see these libraries there

jai
10-23-2003, 09:25 AM
/r:%assemblies%
this tells the location from where it should take the user created assemblies which you are using in your project.
If you are not using any just ignore it

PeOfEo
10-23-2003, 05:11 PM
What added functionality do developers get from components anyway? I mean I have never seen the need to make my own components, why would one do that?

Crazy
10-23-2003, 08:58 PM
QUOTE]What added functionality do developers get from components anyway? I mean I have never seen the need to make my own components, why would one do that?[/QUOTE]

Well I believe the reasons are two-fold. Firstly it breaks up the presentation from the logic, this creates an environment where multiple developers can work on the same project without interfering with each other. It really is splitting web design from web development, I mean it leaves the web designers to do their job whilst the web developers can do theirs. Secondly any component you create can be used from numerous applications (if created properly). For instance a Web Form you create may also be used as a Windows Form without having to alter the code. If your not sure I'd suggest checking out an ASP.NET components text, there are many publications covering ASP.NET Components. I mean even on a basic level User Controls (which are a type of component; in ASP the nearest thing would be includes but User Controls are more powerful) can significantly reduce the code you have to write for features that you'll repeat over several pages. It is also proper web development where you split data, application logic, and presentation from one another.

PeOfEo
10-23-2003, 09:16 PM
Well using components is not high on my 'to do' list of things to learn. I do this as a hooby and I design alone so I don't have to worrie about a team, I also am not reusing form etc very often. Once I get better at java I want integrate internet applications to my pages. I was thinking of using soap & xml web services. That is what I have been reading up on.

-------- Interesting ------
www.blizzard.com and browse around the warcraft three stuff.
http://www.battle.net/war3/ladder/WAR3-player-profile.aspx?Gateway=Azeroth&PlayerName=airship-knight

That is just a players profile I selected at random. Ok notice all the rating and all, this is for a game, an online multiplayer game. This is a real time strategy not some web site game I mean this is an actual game that you would buy at the store. This site displays records results and in the ladder area has some shtml that genorates dynamic graphs of reasults and all the information is sent from the game to the battle.net server (operating system similar to irc) then on to the web server. Its amazing how much they did. Just thought I would point it out.

Crazy
10-23-2003, 10:07 PM
Well using components is not high on my 'to do' list of things to learn. I do this as a hooby and I design alone so I don't have to worrie about a team

I feel as if I have offended you, it wasn't my intension. I'm a learner here too. I was just trying to offer some helpful advice. From what I can gather it is up to the developer, you don't have to use components, that's fine, but if you decide to work as a developer then you'd need to know about components. I wasn't being rude.

I was thinking of using soap & xml web services. That is what I have been reading up on.

I've also covered this, it is I suppose the new DCOM.

I'm just wondering from one hobbyist to another, do you ever get fed up with all the stuff you have to learn and keep up to date? I love development but I'm sick of all the non-stop studying, which is for the rest of your life. I mean I have about 40 books on development and around half are on ASP.NET alone, it's so damn huge it's impossible to keep up, I always feel like I'm taking one step forward and two steps back.

PeOfEo
10-25-2003, 11:42 PM
Originally posted by Crazy
I feel as if I have offended you, it wasn't my intension. I'm a learner here too. I was just trying to offer some helpful advice. From what I can gather it is up to the developer, you don't have to use components, that's fine, but if you decide to work as a developer then you'd need to know about components. I wasn't being rude. Lol you did not offend me at all. Did I make it seem that way? We just have different areas we are focusing on, thats what I was trying to say. :D. I enjoy learning new stuff, but it can get annoying when I can't find a good tutorial site and I don't have the cash to buy a nice fat book. I am a student and only employed part time, I do not have the $50 bucks to spend on books whenever I want. Well I do have the extra money, but I have plans for it (A 2.4 ghz intel p4 with 800mhz fsb and 512k cache!).