0

Azure runtime features RoleEnvironment.IsEmulated property that is meant to tell whether the code is running in Azure Compute Emulator or in real Azure cloud.

Yet the usual approach seems to be obtaining RoleEnvironment.DeploymentId and checking whether it looks like a GUID representation. This approach is suggested as an answer to this and this questions.

Why is RoleEnvironment.IsEmulated not used? Was it just introduced in later versions of the runtime or is there anything wrong with it?

Community
  • 1
  • 1
sharptooth
  • 167,383
  • 100
  • 513
  • 979

1 Answers1

3

This property was introduced on later stage (I may say it is pretty new), then the referenced questions have been asked. The property has been introduced in SDK 1.5 (September 2011), which is also mentioned in one of the late answers of the second referenced question.

Community
  • 1
  • 1
astaykov
  • 30,768
  • 3
  • 70
  • 86