Because the movie rights for Spider-Man are owned by Sony and the movie rights for Avengers are owned by Marvel/Disney, the possibility of the two franchises ever appearing in the same film is slim to none. However, according to Latino Review, a very subtle Amazing Spider-Man easter egg almost made it into Avengers. Here's what the site is saying:

Here’s the story – last week, The Amazing Spider-Man’s production designer J Michael Riva passed away after suffering a stroke at the age of 63. Not only did he design the Oscorp Tower for ASM, but he has a staggering resume of awesomeness including The Goonies, The Color Purple, A Few Good Men, Congo, Evolution, and the upcoming Django Unchained.

Oh – And the Iron Man movies.

That design overlap, and the stunning look of the Oscorp Tower (seriously stunning) was enough for Marvel Studios and Sony to have the discussion about inserting Oscorp into The Avengers skyline. The Unified Marvel Manhattan Skyline almost existed.

By the time the Oscorp building was fully designed, The Avengers digital Manhattan was already basically rendered and there was some up-conversion that needed to go down, so – for timing – it was scrapped.

BUT – Sony and Disney were going to let this happen. THAT’s the key thing here. Timing just didn’t work out.

How cool would that have been? Sure we may never see Spidey crawling on the ceiling of the Avengers Mansion or fighting alongside Cap and Iron Man, but this little nod to the comics still would have been cool to see. Oh well, maybe in future installments. 

[via Latino Review