TracExplorer and VS 2010 Integration(Nov 27, 2010)
IntroductionCaveat: I'm new to an issue tracker system. How I use Trac and TracExplorer, as described here, may not be a good practice, but it worked.
(you can skip the introduction if you already know Trac and TracExplorer well)
Trac is an interesting issue tracking system. Its default feature set provides what many software developers need. Trac's plugin architecture also allows us to add more features to the system if we need them. Therefore, default Trac is useful and relatively simple. Extended Trac is more powerful, but may be complicated. Using Trac inside the Visual Studio can also be convenient, provided that the integration provides adequate features and user interfaces.
TracExplorer has a fascinating idea for VS 2005 and 2008 integration. However, the available binary in source forge does not work with VS 2010. In addition, TracExplorer (as of version 0.20 beta) is not feature rich. It is rather inadequate and not improved for months. For example, TracExplorer does not allow the user to create a new ticket. A typical web-based user interface is needed. Yet, it allows us to quickly view and modify tickets. Many people may be satisfied with the available features.
This integration contains two parts: installatiion of Trac's XML-RPC plugin, which is a requirement of TracExplorer, and VS 2010 integration.
Installation of XML-RPC plugin
- Get the plugin by downloading its source package. Don't worry that you do not get the binary. The actual installation is simple.
- Extract the source package to a preferred folder. Inside the package, we mainly use the source inside the trunk. Other folders usually contain outdated version provided for compatibility.
- Generate an 'egg' package. This step requires Python, but we should already have it installed as Trac's prerequisite. A default Python's folder from BitNami is "C:\Program Files\BitNami Trac Stack\python\python."
Therefore, in the command prompt of the trunk folder, type
"C:\Program Files\BitNami Trac Stack\python\python" setup.py bdist_egg [Note: the double qoutes are needed to dealing with a path with space.]
- The necessary outputs is in the newly created 'dist' folder. Copy all *.egg files (typically, there is only one egg file for this plugin) from there to Trac's plugin folder. An example of the plugin folder is
"C:\Users\username\BitNami Trac Stack projects\InitialProject\plugins"
- change trac.ini of a project that wants to use the plugin by including lines
tracrpc.* = enabled
Note that if the [components] section already exists, there is no need to create a new one. Just append 'tracrpc.* = enabled' to the section.
- Restart the apache service. It is important to note that the service name is tracApache if you use BitNami. If you need to run this service from a command line, use
"C:\Program Files\BitNami Trac Stack\apache2\bin\httpd.exe" -k runservice
If you want to install this plugin for every project, try using easy_install descriped in Trac website.
Visual Studio 2010 IntegrationThis section is probably why you come to this page. You may think that you need an installer for integration, but it is not necessary at all. All you need are compatible add-in binaries and add-in description file.
- Download the package I built from this link. This package includes binaries and description file. If you are interested in how I prepared the package, see the next section.
- Unpack it to your preferred folder. No need to bother with "Program Files". Any folder will do.
- Open VS 2010.
- Go to 'Tools->Options.'
- In the 'Add-in/Macros Security' in the 'Environment' node. Then, 'Add..' the path to the folder in you chose in Step 2.
- Close and reopen VS 2010.
- Verify add-in installation: (1) Go to 'Tools->Add-inManager'. You should see TracExplorer.VSTrac listed there; (2) By clicking 'View' in the menu bar, you should see 'Trac Explorer.'
Preparation of Binary Package
This part is for those who are curious about how I built the add-in from the source code provided in SourceForge.net.
Note: I do not modify any source code. I just rebuild the binary and add a proper add-in description file.
- Install TortoiseSVN in its default folder. You need TortoiseSVN, as the build script uses a file from TortoiseSVN. The file is specified by the default path of TortoiseSVN. If you already installed it elsewhere, see note at the end of this section.
- Check out the source tree from SourceForge. The SVN command is 'svn co https://vstrac.svn.sourceforge.net/svnroot/vstrac vstrac.' If you use TortoiseSVN to do this, just enter the URL https://vstrac.svn.sourceforge.net/svnroot/vstrac.
Do not use GNU tarball, as the build script needs to obtain some information of the SVN source tree. This information is automatically available if you use SVN to check out the source tree.
- Go to the 'trunk/src' folder. Use VS 2010 to open TracExplorer2008.sln.
- Rebuild the solution in a release mode. Whatever you try to do, you will get x86 binaries compatible with VS 2010 in the 'trunk/bin' folder.
In this case, version_scm.bat in the 'build' folder will not work. You, however, can specify your TortoiseSVN path by modifying the batch file.
Trivia: In SourceForge, this software is called TracExplorer, but in Visual Studio's view, it becomes Trac Explorer (with space added).
Hope this helps,