Trying to publish using Azure SDK 2.5 results in a null-ref (Object reference not set to an instance of an object) [closed]

China☆狼群 提交于 2019-12-23 14:51:55

问题


We upgraded our azure deployment project from SDK 2.4 to SDK 2.5.

The project has two worker roles.

Publishing the 2.4 project to a cloud service used to work fine but after upgrading to 2.4 we see publish failing with the following output in the Microsoft Azure Activity Log Window:

4:44:19 PM - Checking for Remote Desktop certificate...

4:44:20 PM - Applying Diagnostics extension.

4:44:20 PM - Object reference not set to an instance of an object.

"Applying Diagnostics extension" is also something we used to not see in 2.4.

Any idea what causes this above error?


回答1:


Turns out this can happen if you have a mix of roles on which diagnsotics is enabled / disabled. This can happen in a few situations.

  1. You explicitly disabled diagnostics on some roles by editing the wadcfgx file.
  2. You explicitly disabled diagnostics for some roles from the UI that you get by double clicking - deployment project > Roles > RoleName.
  3. You upgraded a 2.4 or earlier project to 2.5. SDK 2.5 introduced a new diagnostics configuration file (.wadcfgx). When you upgrade your project, visual studio will take the old .wadcfg file and transform it into the new .wadcfgx file. Due to a bug, some times this transformation fails to create / add the new file.

The workaround is to either disable diagnostics on all roles or enable it on all roles. You can then play with the configuration in the wadcfgx file to control the data that you need to transfer / block.



来源:https://stackoverflow.com/questions/28445294/trying-to-publish-using-azure-sdk-2-5-results-in-a-null-ref-object-reference-no

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!