Check out http://www.solverfoundation.com. This is a new product by Microsoft, a pure managed library that can be accessed from all CLS-compliant .NET languages.
find any spanning tree T first. O(n). Suppose we have m extra edges. For each edge, put it back into T and find the largest edge on its circle. After we replaced all these m edges, we are done. Since we have at most 8 extra edges, it is O(n).