As you have found, adding code to an InfoPath 2013 form requires Visual Studio 2012. I donβt know how to use it with any other version of Visual Studio.
Depending on what you intend to use your code for, you can go through the qRules library (full disclosure: I am one of the developers of this library). It contains many of the most common functions for which people tend to use code in InfoPath, and you can use them simply by following the rules in your form, eliminating the need for any version of Visual Studio.
If there is a specific thing that you are looking for for code, I can tell you whether it is possible to do this with qRules, but you should open a separate question for this (and let me know here).
source share