Microsoft veteran Charlie Kindel, who led the effort to get independent app developers on board with Windows Phone, is leaving the company after 21 years to launch a startup — but he says he still believes strongly in Microsoft’s long-term prospects against the likes of Apple and Google in the mobile market.

“To the Windows Phone team: I may stop using some Microsoft products now that I’m out of here. But not Windows Phone. The BEST product Microsoft has ever built. Do not let up!” he wrote in his farewell message today.

He says he’ll be staying in the Seattle region building a new tech company. He’s not saying much about the startup yet, but he notes that it will be focused on on advertising, mobile, cloud computing and youth athletics.

Kindel was most recently general manager of the Windows Phone Developer Ecosystem, leading design and development of the Windows Phone 7 Application Platform.

The catalog of Windows Phone apps has climbed to nearly 27,000 in a little more than a year. That still pales in comparison to the hundreds of thousands of third-party apps available for iPhone and Android. However, Microsoft has said its app numbers aren’t padded like its competitors’ numbers are.

Kindel’s past roles at the company included co-founding Microsoft’s eHome division and leading the launch of Windows Home Server.

Kindel says he shifted his Windows Phone responsibilities earlier this year to Microsoft mobile GM Matt Bencke and his team, which includes Brandon Watson, another key figure in Windows Phone apps.

From the outside, the timing of Kindel’s departure might seem unusual. Microsoft’s challenge has only gotten tougher over the past year, as its overall share of mobile phone sales has fallen sharply vs. Apple and Google. And the company is just now gearing up for the debut of the next major update for Windows Phone, code-named Mango, due out this fall.

I asked Kindel about the timing as part of a broader email exchange about his departure, and his plans.

Why leave now? I realize that Mango has RTM’d, but it seems like the developer relations for it would be key right now.

Kindel: Like taking vacation or having a baby, there’s never a good time. In reality, I stepped away from day to day Windows Phone work earlier this year to focus on what I wanted to do with my career next. I went into “learning mode”. As I was looking at what would excite me next, serendipitously, the opportunity to do a startup outside of Microsoft came up. Every fiber of my body has told me “it’s finally time”.

How do you feel about the state of the Windows Phone developer ecosystem at this point, and Windows Phone overall?

Kindel: I’m extremely proud of what we’ve accomplished. When we started we knew it was a marathon, not a sprint. In my view, the first release represented the first leg of the marathon. We clearly got through that leg in a very credible way. We have close to 27,000 apps in the marketplace, the best toolset, and amazingly high customer satisfaction. We would not have gotten to the table with Nokia if they didn’t believe we were in the race to win long term. We’re now in the middle phase of the marathon. This is where Microsoft’s stamina genes will come into play.

For me personally, I’m fundamentally an entrepreneur. In the businesses and products I’ve built at Microsoft I’ve done duty slogging it out in the middle and I’ve clearly proven I can finish, but at my core I’m best at getting things off the ground.

The Windows Phone Developer Ecosystem is in fantastic hands. The team is built to execute like a well-oiled machine. Brandon Watson has just the right combination of spunk and data-driven execution skills needed for the job. His team is awesome and I feel great about leaving them to finish the job.

Can you say more about your company (the name?), who else is involved, whether you’re getting funding, etc?

Kindel: Not really. We will be in stealth mode for some time. We are angel funded but not ready to disclose from who. I can say that I’m giddy with excitement about it! Other than a great core team, a great idea, and funding we have nothing. I love that!

If you build an app for your new company, which mobile platform will you target first? :)

Kindel: Hypothetically, if my new company were to build mobile apps, we’d target WP7 first. You know the old saying “Code Talks”: I know I can build a beautiful and functional WP7 app in a fraction of the time it would take to build an iOS or Android app. Startups are about executing quickly. But I’m sure we’d quickly take what we learned there and apply it on all the popular devices.

Update, 10 a.m.: Here’s Kindel’s blog post on his departure, with the full text of his farewell message.