Context-oriented programming (COP) treats context explicitly and provides mechanisms to adapt behavior dynamically in reaction to changes in context at runtime. These languages are desirable to context-sensitive embedded software since such software usually works in various contexts of heterogeneous devices and complex environments. Moreover, a practical development requires proper handling of legacy programs and product lines. To realize these characteristics, we have developed a C# framework called ContextCS that contains the following features: layer creation at runtime, separation of layer managing program, and the layer with annotation. The article presents the structure of ContextCS.