Analytics


Google

Friday, April 25, 2008

Writing .Net application without Visual Studio

Even though it is much easier to write .Net application using Visual Studio but it is still possible to write applications using just a notepad. If you have Windows XP, Framework 1.1 comes pre-installed. There is currently two main Frameworks available 1.1 and 2.0. Framework 3.0 and Framework 3.5 are just Framework 2.0 with additional add-ons.

If you have Framework 1.1 installed, the folder will look like this:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

While if you have Framework 2.0 with 3.x installed, you will see
C:\WINDOWS\Microsoft.NET\Framework\v2.0 and then see folder below it.

To compile a program, you need you just need to specify the proper compiler to compile it. Suppose you wrote a program called it HelloWorld.vb, you compile it using the the following command (then it will generate the application HelloWorld.exe):

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc HelloWorld.vb

If your program refers to other libraries then you add /r: followed by the list of assemblies it refers to. For example, /r:System.data.dll,System.Web.xml.

For Asp.net applications, you will need to compile it .dll files, so add /t:library. You can also use /o:HelloNewWorld.exe to change the output filename. To compile csc intead of vbc to compile CSharp programs.

No comments: