fixed exception when loading resources: "The invoked member is not supported in a dynamic assembly"