NASA and SpaceX signed a contract for COTS cargo resupply services on 18 August 2006.
The agreement called for three test-flights, under the COTS phase 1 demonstration program.
The first COTS mission, COTS Demo Flight1, was completed successfully on 8 December 2010, when the Dragon capsule was successfully recovered from orbit.
Due to the mission's success, SpaceX asked NASA to combine the COTS 2 ISS flyby flight, which would have seen a Dragon spacecraft approach the station but stay about 10 km away from it, and the COTS 3 flight that would berth with the ISS.
At a 15 July 2011 meeting, NASA tentatively approved combining the two COTS missions to accelerate the program into the operational supply mission phase in 2012.
On 9 December, NASA officially approved the merger of the COTS 2 and 3 missions into the renamed Dragon C2+ flight.

The Falcon 9 launch vehicle arrived at SpaceX's Cape Canaveral, Florida facilities at Launch Complex 40 (LC-40) in July 2011.
The mission's Dragon spacecraft arrived at the launch site on 23 October 2011.
On 1 March 2012, a fueled countdown test called a Wet Dress Rehearsal (WDR), was successfully completed for the COTS 2 mission.
On 16 April its Flight Readiness Review (FRR) was completed by NASA and stated that a 30 April launch was feasible.
Following the review SpaceX announced a launch delay, due to continued flight software testing issues, and the next major mission milestone was the successful Falcon 9 static-fire engine test on 30 April.
NASA approved Dragon's flight software on 11 May, solving an issue that had previously been responsible for several launch date postponements.
On 17 May, the mission passed its final launch review and the Falcon 9/Dragon were erected on the launch pad in preparation for the launch.
The first launch attempt, on 19 May, was aborted at T-00:00:00.5 due to a pressure issue in one of the Falcon 9's engines.
The launch window was nearly instantaneous, for fuel-efficiency reasons, leaving little margin for error due to fuel consumption restrictions caused by the extra manoeuvres required to certify the Dragon spaceship before attempting to berth with the ISS.
Dragon's launch window could have been longer, but the extra fuel required to catch the ISS would have likely surpassed safety margins, due to the pre-berthing tests.
NASA and SpaceX signed a contract for COTS cargo resupply services on 18 August 2006. The agreement called for three test-flights, under the COTS phase 1 demonstration program. The first COTS mission, COTS Demo Flight1, was completed successfully on 8 December 2010, when the Dragon capsule was successfully recovered from orbit. Due to the mission's success, SpaceX asked NASA to combine the COTS 2 ISS flyby flight, which would have seen a Dragon spacecraft approach the station but stay about 10 km away from it, and the COTS 3 flight that would berth with the ISS. At a 15 July 2011 meeting, NASA tentatively approved combining the two COTS missions to accelerate the program into the operational supply mission phase in 2012. On 9 December, NASA officially approved the merger of the COTS 2 and 3 missions into the renamed Dragon C2+ flight.
The Falcon 9 launch vehicle arrived at SpaceX's Cape Canaveral, Florida facilities at Launch Complex 40 (LC-40) in July 2011. The mission's Dragon spacecraft arrived at the launch site on 23 October 2011. On 1 March 2012, a fueled countdown test called a Wet Dress Rehearsal (WDR), was successfully completed for the COTS 2 mission. On 16 April its Flight Readiness Review (FRR) was completed by NASA and stated that a 30 April launch was feasible. Following the review SpaceX announced a launch delay, due to continued flight software testing issues, and the next major mission milestone was the successful Falcon 9 static-fire engine test on 30 April. NASA approved Dragon's flight software on 11 May, solving an issue that had previously been responsible for several launch date postponements. On 17 May, the mission passed its final launch review and the Falcon 9/Dragon were erected on the launch pad in preparation for the launch. The first launch attempt, on 19 May, was aborted at T-00:00:00.5 due to a pressure issue in one of the Falcon 9's engines. The launch window was nearly instantaneous, for fuel-efficiency reasons, leaving little margin for error due to fuel consumption restrictions caused by the extra manoeuvres required to certify the Dragon spaceship before attempting to berth with the ISS. Dragon's launch window could have been longer, but the extra fuel required to catch the ISS would have likely surpassed safety margins, due to the pre-berthing tests.
SpaceX COTS Demo Flight 2