There is a code for the main dining room. Not everyone follows it. You do not have to wear a skirt or dress every night. If you have a nice pants suit or, even, nice pants and top, you will do fine. Believe me, you will still shine compared to some (a small few) who enter the dining room. Even on a formal night, you can get by with a "dressy" pants outfit. (And thos small few will still look the same, but you are not with them and who cares?).