Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sometimes - cannot build Windows Azure Cloud Service - Object reference not set to an instance of an object?

I've got a solution where I've got worker role, some project library and cloud service. Sometimes I cannot build solution (without changing source code or anything).

Output windows shows:

1>Error: Object reference not set to an instance of an object. ========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

When I try edit worker role properties in Cloud Service project, I got popup window "Object reference not set to an instance of an object".

When I try to remove worker from Cloud Service project, I got popup window

"Windows Azure Tools for Microsoft Visual Studio.

The service definition or the service configuration is invalid. Please fix the error(s) in the service definition (.csdef) or service configuration (.cscfg) files to perform this action."

I'm not sure if it is connected with build problem - but when build is working those problems also not exist, so I can assume that this is somehow connected.

This is strange because I can't figure why sometimes it's working and sometimes not.

Anybody?

like image 807
pyskaty Avatar asked Jul 30 '14 13:07

pyskaty


1 Answers

I was able to fix this problem by unloading the Azure project and then reloading it.

  1. Right click the Azure project.
  2. Click "Unload Project".
  3. Right click Azure project again.
  4. Click "Reload Project".

Update

This just happened to me again and these steps were not enough, I had to close Visual Studio and open it again.

like image 72
tkburbidge Avatar answered Sep 21 '22 18:09

tkburbidge