Can ASP.NET be compiled without Visual Studio?

  • Thread starter Thread starter Jordan
  • Start date Start date
J

Jordan

I would like to take my ASP.NET project to another computer, which doesn't
have Visual Studio.

If I modify the code there, is there a way to recompile it without Visual
Studio?

Thanks!
 
And, jsc.exe is also in the same directory,
should you wish to write/compile your ASP.NET apps in J#.net.



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
 
As a side note to Brocks advice - if you only have the runtime installed on
the remote machine, and not the SDK then you may have to invoke a cmd window
that sets the environment variables required to do a manual compile. There
is a batch file (setenv.bat I think) that you need to run.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
Hi Brock,

Thanks for the quick reply. My project is in C#. I have been looking at
the parameters for the "csc" executable.

I hate to ask, but would you know of way to compile a whole project using
"csc"?

Visual Studio seems to create a nice ".csproj" file that has everything in
it.

Thanks, again!
 
Right, but your requirement was that you didn't have VS.NET, right?

The basics of running it are:

csc.exe /t:library /r:bin\SomeDependantAssembly.dll /r:bin\SomeOtherAssembly.dll
/out:bin\MyAssembly.dll file1.cs file2.cs file3.cs

So, /t: says to build a DLL assembly
/r: is a reference to the path of any dependant assembly
/out: says where to put the generated assembly
and then all the files that should be compiled into that assembly

If you're interested in a debug build, add /debug in there too.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
Sorry for the confusion. I have a C#, ASP.NET project that I built using
VS.

Now, I need to take the project to another computer that doesn't have VS,
modify, and rebuild the code. So, I will still have the ".csproj" file, but
I need a way to compile it.

I have tried to view the compile process from Visual Studio, but the steps
are not displayed.

Would you know how to compile the ".csproj" or view the compile steps in VS?

Thanks!
 
That's the problem -- .csproj is a VS.NET file. It's where VS.NET keeps all
of its info necessary to compile the assembly. You'd have to pick apart the
..vsproj and infer the proper command line arguments I showed earlier. There's
no parser (other than VS.NET) that I'm aware of that will do that. You could
build your own.

Also, I am assuming you're speaking of VS,NET 2002/2003, yes? If you're running
VS.NET 2005, then it uses MSBuild config files, so with that version you
could use MSBuild.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
Yep. Nant is a XML based configuration build tool. You'd have to maintain
your own XML "scripts" to tell Nant how you'd like it to build your assembly.
I don't know if they have utilities that will read a .csproj and build their
XML files though. Ideally, that's what you'd like, I think. So, in a sense,
Nant is doing what VS.NET is doing for you now (modulo the Editor, Debugger,
etc). MSBuild in 2.0 is MSFT's version of Nant, so to speak.

(Quickly scanned the article posted)

Looks like SLiNgshoT will do this conversion for you! Give it a shot and
let us know how successful it was :)

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
Hi Brock,

Fyi, I was able to get the NAnt to work today.

Download from here:
http://sourceforge.net/projects/nant

Description here:
http://www.code-magazine.com/article.aspx?quickid=0507081

Installation:
Just unzip, copy where you want, and add the bin folder to your path.

Copy the projects ".sln" file into the project directory.
Tumbleweed.sln

Add a build file to the project directory with the extension of ".build".

Here's mine:
<?xml version="1.0" encoding="utf-8" ?>
<project name="Tumbleweed">

<target name="build">

<solution configuration="debug"
solutionfile="Tumbleweed.sln">

<webmap>
<map url="http://localhost/Tumbleweed/Tumbleweed.csproj"
path="C:\Inetpub\wwwroot\Tumbleweed\Tumbleweed.csproj" />
</webmap>

</solution>

</target>

</project>


You compile from the comand line like this:
nant build

That's it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top