Microsoft (MSFT) revealed plans on Monday to shell out $300 million to invest in the Nook and college text businesses of Barnes & Noble (BKS), sending the struggling bookseller’s stock skyrocketing more than 90%.

The surprise alliance aims to capitalize on the transformation in the publishing world in favor of rapidly-growing digital text.

As part of the pact, the two companies are forming a new Barnes & Noble subsidiary that will house the Nook and college businesses and after a $300 million investment by Microsoft will have a valuation of $1.7 billion.

The new division, being called Newco for now, will be 82.4% owned by New York-based Barnes & Noble, while Microsoft will own the remaining 17.6%.

The alliance includes a deal to produce a Nook application for Microsoft’s Windows 8 operating system.

Wall Street cheered the collaboration emphatically, bidding shares of Barnes & Noble 90.28% higher to $26.03 ahead of the opening bell. They had been off more than 5% on the year as of Friday’s close.

“Microsoft’s investment in Newco, and our exciting collaboration to bring world-class digital reading technologies and content to the Windows platform and its hundreds of millions of users, will allow us to significantly expand the business,” Barnes & Noble CEO William Lynch said in a statement.

Barnes & Noble disclosed plans in January to consider a spinoff of its digital business to maximize shareholder value. It now says it plans to “explore all alternatives for how a strategic separation” of the new division may occur, but warned there is no guarantee it will result in a stand-alone public company.

Microsoft and Barnes & Noble also said they have settled their patent litigation, and Barnes & Noble and Newco will now have a royalty-bearing license under Microsoft’s patents for the Nook eReader and tablet devices.

“The shift to digital is putting the world’s libraries and newsstands in the palm of every person’s hand, and is the beginning of a journey that will impact how people read, interact with, and enjoy new forms of content,” said Andy Lees, president of Microsoft.

Barnes & Noble said it hasn’t decided on a name for the new subsidiary.

Follow Matt Egan on Twitter @MattMEgan5