XSN files are just cab files, but .NET doesn’t ship with APIs to easily decompress them. After a little bit of poking around I found SevenZipSharp to be the fasted and simplest way to do so.
1. Install 7-Zip
2. Download SevenZipSharp
3. Reference the SevenZipSharp DLLs in your project
4. Change your projects target platform to x86 or x64 (depending on what platform you are using). Properties, Build—>Target Platform.
5. Add these 3 lines of code to your project.