A different option is to use the time you've spent on the project as part of the basis for the IP you're developing, and claim a non-zero basis when you sell, thus reducing the amount of capital gains taxes you have to pay versus having a cost basis of $0. Again, this gets heady quickly: talk to an accountant.
Personally, at my scales, I find it easier to bill clients $10 than to decrease my tax burden by $1.
One possibility, however, is to pay yourself a salary. Then from the business side, you could write off the salary as a business expense. But now you will pay personal income taxes on the salary. Also, you cannot do this if you're a sole proprietor, and even if you're incorporated, should probably consult with an accountant and/or lawyer to make sure it's legit in your case.