make sure you use SetProperty on properties you can't access via custom actions, which component are you trying to reach?

in all cases, you'll need to use the linker wizard, which will go through all your usages and properly tell Unity what to keep during publishing, as SetProperty uses Reflections which makes Unity un aware of what you really need when compiling.