Developing ASP.NET with SharpDevelop
For some time I didn't have a copy of Visual Studio, which made developing ASP.NET code something of a pain - essentially you ended up limiting your self to using .aspx files with inline code and using Trace.Write() or worst still simply echoing out debug messages to the page you were developing - there is only so far you can go like this!This is where SharpDevelop comes in. SharpDevelop is a free, open source C#/VB.net IDE for use with .NET 1.1 and offers a lot of the bells and whistles that Visual Studio does (like intellisense and syntax highlighting); its primarily intended for use with devloping 'traditional' applications (i.e. command line applications, standard windows applications), but we can configure it so that it'll happily compile the DLL files we need for ASP.NET code behind - here is how:
- Start up SharpDevelop and create a new combine
- In the "New Project" dialog, select either C# or VBNET, and then select the "Empty Project" icon.
- Now give your project a name, and chose the path where you'd like to store all of the files. If you are putting your files directly into your ASP.NET application's directory on the server (probably not the best way to do things, but there you go) make sure you untick the "Autocreate project subdir" option.
- Ok, now the important step - IIS will expect to find an ASP.NET's DLL in the <apppath>bin folder. To configure SharpDevelop to output directly to this folder, right click on the project in the projects tab, and goto the "Project Options" menu item.
- In the "Project Options" dialog, goto the "Configurations" branch and chose which configuration you want to alter (I'm going to select Debug here), then click on the "Output" item.
- Change the "Compile Target" to "Library"
- Now, shorten the "Output Path" so that instead of going to <apppath>binDebug (Its debug here - it will depend on what Configuration you chose) it points to <apppath>bin instead.
- Hit "Ok" to close the "Project Options" screen.
Back
23.02.2006.