Welcome Guest, you are in: Login

Yet Another Forum.NET Documention

RSS RSS

Navigation





Search the wiki
»

PoweredBy
I've been working with YetAnotherForum for a while now. It's an open-source .NET forum control written in C#, and it's great software. I've made some contributions here and there with a smiley pak, an avatar collection, and helping others work problems on the forum. Today I've decided to take the next step and contribute code to the project. As an open-source project the YAF source code is available to anyone, it's stored on a SourceForge SubVersion repository at the following address:

https://yafdotnet.svn.sourceforge.net/svnroot/yafdotnet

I'm documenting the steps I took to get the source code up and running locally, for future reference.

Connect and Obtain the Sourcecode from the Repository

  1. Create an account with SourceForge.Net.
  2. I'm running Vista x64 Business Edition, so I need a SubVersion (aka SVN) Windows client. Download and install TortoiseSVN, the best SVN Windows client out there.
  3. After installation and a system reboot, you'll notice TortoiseSVN has been incorporated into your right-click context menu. Choose "SVN Checkout...". The url of the repository for the YAF project is above, and then choose a local directory that will mirror the repository.

Setup Solution for Development and Compile

  1. Create a new local database named yafnet.
  2. Open yetanotherforum.net.vs2008.sln with Visual Studio and go through the conversion process (I don't think a backup is necessary).
  3. Modify the properties of each project in the solution to use the .NET 3.5 Target Framework.
  4. In the website project (YetAnotherForum.NET), delete the web.config file in the root. This was created automatically when you changed the target framework. Copy recommended-NETv3.5-web.config from the webconfigs directory into the root and rename it web.config.
  5. Edit web.config and change compilation debug to true.
  6. Edit web.config and add minRequiredNonAlphanumericCharacters="0" to membership provider string. During YAF installation in the next steps, when I create a new admin his password doesn't contain any weird characters. If I don't add this attribute then installation fails with "password invalid" because the default is 1.
  7. If you compile the solution at this point and receive 4 errors of:
    Compiler Error Message: CS0433: The type 'System.Web.UI.ScriptManager' exists in both 'c:\windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\windows\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll'
    Edit your web.config and add the following code beneath the settings:
    <runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime>
  8. Compile the solution, should be successful.

Setup Solution to Debug Using IIS

  1. Open IIS and create a new website. Set the site's physical path to that of the website project directory.
  2. In Visual Studio, right-click the website project and choose "Start Options...". Choose Server -> Use custom server -> Base URL: http://localhost/. Install YAF Locally
  3. Set website project (YetAnotherForum.NET) as Startup Project. 4. Set /install/default.aspx as Start Page. 5. Edit app.config and set your configPassword for installation. 6. Debug the solution (F5), enter your password, attempt to install full text search support, and install YAF!

Committing Changes

  1. Try and make sure you have the latest source code, by 'Updating', before you edit code and submit changes.
  2. Commit changes by right-clicking your modified file and choosing 'SVN Commit...". Simply enter a description and then your username and password. If you're just starting out, you won't have permission to commit changes and the process will fail. Instead, you need to create a patch, as described below. You will need to contact the YAF admins to be added as a developer with commit privileges.

Creating a Patch

  1. If you do not have YAF repository commit privileges, you will need to create a patch.
  2. Verify you have the latest source code before editing it and creating a patch.
  3. Right-click your modified file -> TortoiseSVN -> Create Patch...
  4. Save your patch locally with an appropriate name and email it to support@yetanotherforum.net.

Enjoy Contributing to the YetAnotherForum Project!

ScrewTurn Wiki version 3.0.5.600. Some of the icons created by FamFamFam.