[Troubleshooting] 如果有安裝 Windows Phone 7 Developer Tools 的話,在安裝 Windows Azure Platform Training Kit 的 C# Code Snippet 時,會發生未預期的例外。

[Troubleshooting] 如果有安裝 Windows Phone 7 Developer Tools 的話,在安裝 Windows Azure Platform Training Kit 的 C# Code Snippet 時,會發生未預期的例外。

這是昨天在編寫 Windows Azure Platform Training Kit 的 Code Snippet 安裝程序時發現的狀況。

[症狀]

在安裝 Windows Azure Platform Training Kit 的 Code Snippets,若同時安裝 VB 和 C# 的 Code Snippets 時,會發生"值不能為 null"的例外,讓使用者無法選擇 C# Code Snippet 的安裝位置,以致於無法安裝 C# Code Snippets。

[原因]

當電腦中安裝了 Windows Phone 7 Developer Tools 時,就會發生這個問題,有可能是因為 Visual Studio 2010 Express for Windows Phone 的 VS Content Installer 內有 bug,以致於在安裝 C# Code Snippets 時出現問題。

[解決方案]

將 Windows Phone 7 Developer Tools 移除後即恢復正常。

相關討論;

http://social.msdn.microsoft.com/Forums/en/windowsazuredevelopment/threads