Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 June 22nd, 2004, 06:03 PM
Registered User
 
Join Date: Jun 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automating Compilation

Hi there,
Just before I upload to our website I want to go through my 30 web applications and compile them all before I FTP.
At the moment I open them each individually in Visual Studio, press f5, close them and then go onto the next.
Is there any way I can write a program that goes through a list of folders and compiles the projects?

Dougie
(A Scotsman writing from South Africa)

 
Old June 22nd, 2004, 10:49 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Did u try to compile project in [u]Command line (RUN)</u>.
I guess u use that within a for in a program & compile it.

Im not sure, but u could try.

Always:),
Hovik Melkomian.
 
Old June 23rd, 2004, 02:08 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Take a look at Nant: http://nant.sourceforge.net/

This program is designed for automatic builds of .NET projects.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 23rd, 2004, 08:01 AM
Registered User
 
Join Date: Jun 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your help
(1) Any idea how much the nant product is, I couldnt find a price on the website.
(2) If you do command line compiles (which I haven't done much)
(a) how to you compile a whole project into a dll, I have only compiled individual .aspx.cs pages , one at a time.
(b) can I load in a file with the commands for 20 applications to compile or do I need to type it all in myself.

Dougie

 
Old June 23rd, 2004, 08:07 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Nant is open source, so no charges apply. Read their documentation for more information about this.

I thought you were talking about a Visual Studio .NET solution, but on reading your post again, it looks like you're talking about precompiling ASPX pages with inline script, right?

If that is the case, look at "Yet another pre-compile tool for ASP.NET web sites" located here: http://www.codeproject.com/aspnet/AS...recompiler.asp

Cheers,

Imar
 
Old June 24th, 2004, 07:49 AM
Registered User
 
Join Date: Jun 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have now downloaded and installed Nant. So I am somewhat further on! I have also read their documentation.
I have no idea what you mean by inline script.
I dont really mind if its VS or not. I just need to recompile 20 projects before I upload every time and dont want to do it manually by opening each sollution in VS and pressing f5 in each of 20 projects 3 times a day!
So my question now is (presuming you know and use Nant)

What would be the syntax in Nant for compiling a project of about 12 aspx pages and some classes (as above) as opposed to just a page.
And how exactly do I execute that script with nant.

Thanks.

Dougie

 
Old June 24th, 2004, 08:04 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

In ASP.NET there are basically two ways to create pages: The Notepad / Web Matrix way and the Visual Studio .NET way.

When you create your pages in Notepad, the Web Matrix, or even in IDEs like Dreamweaver, all code, like VB.NET or C# code is place inline in the page. So the .aspx page contains both the HTML and controls' markup and the programming code for Click and Load events.
When you request a page in the browser the page will be compiled o the fly, the result is cached for future requests and then the page is executed.

Visual Studio .NET, on the other hand, has a "code behind" model. The code you write is located in a separate file from the markup (in an .aspx.cs or .aspx.vb file). Before you can run your page, you'll need to compile it into 1 big assembly, a DLL file. This DLL, together with the ASPX pages is then uploaded to the server. When an aspx page is loaded, the .NET framework checks the Inherits attribute of the page to see what class the page inherits from and then locates that class in the assembly.
Note that there is no need to upload the .cs, .vb or .resx files to the remote server.

So, to advice you how to proceed, it's important to know what model you're using.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Code by Faithless (Track 10 from the album: Outrospective) What's This?
 
Old June 24th, 2004, 09:05 AM
Registered User
 
Join Date: Jun 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, I understand. We use the VS way with codebehind .cs files.
So we are compiling 20 folders with about 6-30 pages each into 20 dlls and then uploading the 6-30 aspx pages in their folders as well.
So thats what I need to be able to do with Nant.

Dougie

 
Old June 24th, 2004, 09:23 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I suggest you check out the Fundamentals section in the user's documentation:

http://nant.sourceforge.net/help/fun...als/index.html

The simple example is a good start:

http://nant.sourceforge.net/help/fun...000000022.html

I am not too experienced with Nant, so I cannot recommend best practices in compiling ASP.NET apps.
Check out this thread for more info: http://p2p.wrox.com/topic.asp?TOPIC_ID=11252

Hopefully, Peter (planoie on this forum) is listening in. He has quite some experience with Nant.
Peter???

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Babylon by The Tea Party (Track 8 from the album: Transmission) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating Assembly Trust Ron Howerton General .NET 1 October 20th, 2005 09:19 AM
Automating File Posting [email protected] Pro VB.NET 2002/2003 1 June 27th, 2005 02:02 PM
Automating Outlook Task PC User Access VBA 0 March 6th, 2005 04:24 PM
question on automating a procedure boksi VB.NET 2002/2003 Basics 6 February 15th, 2005 06:11 PM
Automating an access database miller2000 Access 5 June 23rd, 2004 09:38 PM





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