RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Using RunUO and Visual Studio

TMSTKSBK

Lord
Using RunUO and Visual Studio

Greetings! Since VS C# Express is free now, I thought I'd share something that might help everyone out.

Instead of copying stuff back and forth from the RunUO folder, starting the server, compiling, testing, breaking, and repeating, you can use Visual Studio to both compile and test your code.

To do this, you have to make a project, and add references to the Server.exe and the Scripts.CS.dll that RunUO creates when you run the server. Here's how you do it.

(The steps presented here are from VS 2005 Pro, but it should be similar in C# Express)

1. Create a project in VS C#:

Click File>New>Project.
Select "Class Library" as the project type.
Change the Name to whatever your project is, and change the file path to where you want the project to be stored.
Click OK.

2. Add a reference to Server.exe:

Click Project>Add Reference...
Select the Browse tab
Browse to your RunUO folder, and select Server.exe

3. Compile the "pure" RunUO scripts:

Create a *new* distro RunUO
Run Server.exe

4. Add the "pure" scripts:

Click Project>Add Reference...
Select Browse
Browse to RunUO/Scripts/Output
Select Scripts.CS.dll and/or Scripts.VB.dll

Congratulations, you may now use your new project and refer to RunUO items automatically.
(oh...and something I love about VS 2005 is the #region taggy. Say #region and #endregion, and you can shrink the text inbetween)
 
Top