"Object reference not set to an instance of an object" when building my cloud project

Matthijs Wessels picture Matthijs Wessels · Oct 3, 2013 · Viewed 28.4k times · Source

When I build my solution with a bunch of cloud projects, I see one or more "Error: Object reference not set to an instance of an object" messages in the output. When I try to run one of the cloud projects, I get the popup "There were build errors. Do you want to continue and run the last successful build", but there are no errors in the Error List and the same "Error: Object ref..." errors in the output.

When I click package on my cloud project I get a messagebox with "Object reference not set to an instance of an object", also when I right click -> properties on the project reference under "Roles" in the cloud project.

If I use the command line to build my solution with msbuild, I don't get the error.

I tried restarting Visual Studio as well as my PC. I also tried reinstalling Azure Tools (2.1) and then Visual Studio.

My colleague is now getting the same problem on Visual Studio 2013 RC.

Has anyone had the same problem?

I've searched, but only found people with problems when publishing, where the solution is to package manually.

Answer

Siva picture Siva · Sep 8, 2014

I had the same problem. Right click on the cloud service project, unload the project. Reload it again.