The US Department of Energy has launched the Zero-Net-Energy (ZNE) Commercial Building Initiative (CBI) in order to develop commercial buildings that produce as much energy as they use. Its objective is to make these buildings marketable by 2025 such that they minimize their energy use through cutting-edge energy-efficient technologies and meet their remaining energy needs through on-site renewable energy generation. We examine how such buildings may be implemented within the context of a cost- or carbon-minimizing microgrid that is able to adopt and operate various technologies, such as photovoltaic (PV) on-site generation, heat exchangers, solar thermal collectors, absorption chillers, and passive / demand-response technologies. We use a mixed-integer linear program (MILP) that has a multi-criteria objective function: the minimization of a weighted average of the building's annual energy costs and carbon / CO2 emissions. The MILP's constraints ensure energy balance and capacity limits. In addition, constraining the building's energy consumed to equal its energy exports enables us to explore how energy sales and demand-response measures may enable compliance with the CBI. Using a nursing home in northern California and New York with existing tariff rates and technology data, we find that a ZNE building requires ample PV capacity installed to ensure electricity sales during the day. This is complemented by investment in energy-efficient combined heat and power equipment, while occasional demand response shaves energy consumption. A large amount of storage is also adopted, which may be impractical. Nevertheless, it shows the nature of the solutions and costs necessary to achieve ZNE. For comparison, we analyze a nursing home facility in New York to examine the effects of a flatter tariff structure and different load profiles. It has trouble reaching ZNE status and its load reductions as well as efficiency measures need to be more effective than those in the CA case. Finally, we illustrate that the multi-criteria frontier that considers costs and carbon emissions in the presence of demand response dominates the one without it.