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
-
-
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.
-
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
-
Create a new local database named yafnet.
-
Open yetanotherforum.net.vs2008.sln with Visual Studio and go through the conversion process (I don't think a backup is necessary).
-
Modify the properties of each project in the solution to use the .NET 3.5 Target Framework.
-
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.
-
Edit web.config and change compilation debug to true.
-
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.
-
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 <system.webServer> 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>
-
Compile the solution, should be successful.
Setup Solution to Debug Using IIS
-
Open IIS and create a new website. Set the site's physical path to that of the website project directory.
-
In Visual Studio, right-click the website project and choose "Start Options...". Choose Server -> Use custom server -> Base URL: http://localhost/.
Install YAF Locally
-
Set website project (YetAnotherForum.NET) as Startup Project.
-
Set /install/default.aspx as Start Page.
-
Edit app.config and set your configPassword for installation.
-
Debug the solution (F5), enter your password, attempt to install full text search support, and install YAF!
Committing Changes
-
Try and make sure you have the latest source code, by 'Updating', before you edit code and submit changes.
-
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
-
If you do not have YAF repository commit privileges, you will need to create a patch.
-
Verify you have the latest source code before editing it and creating a patch.
-
Right-click your modified file -> TortoiseSVN -> Create Patch...
-
Enjoy Contributing to the YetAnotherForum Project!