Compositional reservoir simulation plays a vital role in the development of conventional and unconventional reservoirs. Two major building blocks of compositional simulation are phase behavior and fluid transport computations. The oil and gas reserves and flow of reservoir fluids are strongly dependent on phase behavior. In conventional reservoirs, capillary pressure is relatively small and is typically ignored in phase behavior calculations. However, large capillary pressure values are encountered in tight formations such as shales; and therefore, its effects should not be ignored in phase equilibria calculations. Neglecting the effects of capillary pressure on phase behavior can lead to an inaccurate estimation of original oil and gas in place as well as recovery performance. In spite of this, the effect of capillary pressure on phase behavior in tight reservoirs has not been well studied using compositional simulation, especially for hydraulically-fractured reservoirs. In this paper, we develop a new compositional reservoir simulator capable of modeling discrete fractures and incorporating the effect of capillary pressure on phase behavior. Large-scale natural and hydraulic fractures in tight rocks and shales are modeled with a technique called Embedded Discrete Fracture Model (EDFM) where fractures are modeled explicitly without using local grid refinement or an unstructured grid. Flow of hydrocarbons occurs simultaneously within similar and different porosity types. Capillary pressure is considered in both flow and flash calculations, where simulations also include variable pore size as a function of gas saturation in each grid block. We examine the impact of capillary pressure on the original oil in place and cumulative oil production for different initial reservoir pressures (above and below the bubble-point pressure) on Bakken and Eagle Ford fluids. The importance of capillary pressure on both flow and flash calculations from hydraulically fractured horizontal wells during primary depletion in fractured tight reservoirs using Bakken fluid composition is demonstrated. Phase behavior calculations show that bubble-point pressure is suppressed allowing the production to remain in the single-phase region for a longer period of time and altering phase compositions and fluid properties such as density and viscosity of equilibrium liquid and vapor. The results show that bubble-point suppression is larger in the Eagle Ford shale than for Bakken. When capillary pressure is considered, we found an increase in original oil in place up to 4.1% for Bakken and 46.33% for the Eagle Ford crude. Depending on the initial reservoir pressure, cumulative primary production after one year increases owing to capillary pressure by approximately 9.0-38.2% for Bakken oil and 7.2-154% for Eagle Ford oil. The recovery increase caused by capillary pressure becomes more significant when reservoir pressure is far below bubble-point pressure. The simulation results with hydraulically fractured wells give similar recovery differences; cumulative oil production after 1 year is 3.5-5.2% greater when capillary pressure is considered in phase behavior calculations for Bakken.