3
votes

I upgraded my project from Azure 1.8 to Azure 2.3 (and from VS2012 to VS2013). My source compiles and runs in the Azure emulator but when the TFS builder tries to compile it throws this error: (I get the same error doing a "package" from the cloud project context menu)

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Windows Azure Tools\2.3\Microsoft.WindowsAzure.targets (2016): A numeric comparison was attempted on "%(TargetOSFamily.Identity)" that evaluates to "" instead of a number, in condition " '$(RoleTargetFrameworkMonikerIsValid)' == 'True' And '%(TargetOSFamily.Identity)' >= '3' And '$(RoleTargetFrameWorkIs35)' == 'True' ".

I have set the osFamily="4", etc. but nothing has changed.

2

2 Answers

2
votes

The ServiceConfiguration element of your service configuration file(s) must have the osFamily and osVersion elements set. After you set them, you must restart Visual Studio. This problem is discussed here.

0
votes

If you look at thid page: http://msdn.microsoft.com/en-us/library/azure/ee924680.aspx

You'll see that osFamily 4 only supports .Net 4 and above.

What this error is telling you is that your project is targeting .Net 3.5 and this is not supported.

You will either have to upgrade your project to .Net 4/4.5/4.5.1 or target osFamily 2. Given that 2 is due to be removed from the portal next month, I'd recommend upgrading you project.