It was frustrating to be stuck with one error for a while. It is exciting to finally get over, and to be able to share the story.
I have a simple WebRole cloud project. It had been building fine, until when I merged it to a different branch. The same package build process produced this error message box.
And, in the output window, it only has one line of error: "...>Error: Object reference not set to an instance of an object." The error message was really terse, I had no idea what was actually going on.
I changed the output option to "Diagnostics" or "Detailed", but it still only gave the same one line error message.
Having searched online resources without a luck to find any meaningful clue, I tried removing the web project reference from the cloud project. It didn't even allow me to do so. Here is the pop-up message box.
I know there is no single issue with the .csdef or .cscfg files, according to what the message indicated. I had to remove it manually from the project file. The "brutal" way got accepted.
During the process of experimentation, quite a lot of "annoying" things happened. The diagnostics.wadcfg file was gone, the important settings data inside .cscfg files were mysteriously lost, and etc.
When I added the same web project back to the cloud project, it popped up another "Windows Azure Tools for Microsoft Visual Studio" related message.
This time the message is very helpful. At least I got hint of the direction. Now I realized that I used to have two versions of "System.Spatial" (5.2 and 5.6) in the dependency package.
I thought ver. 5.2 was old, so I removed it from the package and kept the latest version (5.6) for "System.Spatial". The "WindowsAzure.Storage" ver. 2.1 is actually referencing "System.Spatial" ver. 5.2.
After I recovered the "System.Spatial" ver. 5.2 back in the package, the problem was solved!
The unexpected blocking issue was resolved. I am wishing any useful error information (like something above in the last dialogue box) would be included in the output window during the build process. This will save us tremendous time and effort.