Both autonom and zoo plugin in one VisualStudio Solution?

Does anybody know how to code and maintain only 1 source code for both standalone and ZOO plugin in 1 visual studio solution that can generate both standalone and ZOO .rhp?
Or can the ZOO plugin naturally switch to an autonom plugin?

This is how the Zoo licensing system for Rhino works. When the user is prompted for a license, they can chose either standalone or Zoo.

– Dale