Introduction - If you have any usage issues, please Google them yourself
The following is an example of how Microsoft Solver Foundation can be used to solve a constraint satisfaction problem (CSP) like generating a typical Sudoku problem.
Sudoku
http://www.codeproject.com/Articles/419389/Sudoku-using-Microsoft-solver-foundation
In this article I do not attempt to explain everything there is to know about constraint satisfaction problems, but I will go over the concepts in the hope that even if you have never heard of CSP you will still get the idea.