Speaking on an Empire Magazine podcast, Avengers: Age of Ultron director Joss Whedon mentioned that he wanted to have Spider-Man and Captain Marvel for the ending of the Avengers sequel.
Via Yahoo UK:
“I wanted all of those people [who do appear]. I said, ‘It would be great if we could just add a few more. If we could have a Captain Marvel there.’ And they talked about it,” Whedon explained.
“And I was like, ‘And Spider-Man, we could do that too, because Sony had approached us during the first movie about a little integration. So, I would have put both of them in, but neither of the deals were made.”
It was during production however that those properties became part of the Marvel Cinematic Universe. Marvel announced a ‘Captain Marvel’ film for Phase Three last year, and then in February Sony and Marvel announced a joint agreement to bring ‘Spider-Man’ into the fold as well.
“Then they’re like, ‘We’re making a ‘Captain Marvel’ movie and we’ve got Spider-Man as a property,’ and I’m like, ‘I’ve already locked my film you f**kers! Thanks for nothing,’” added a joking Whedon.
We’ll just have to wait for Cap 3!