简体   繁体   中英

Azure SDK 2.9 Invalid Schema “2015-04.2.6”

I upgraded my Azure project from 2.1 to the latest, 2.9. Everything seems to have updated but I keep getting the following error:

The XML specification is not valid: The 'schemaVersion' attribute is invalid - The value '2015-04.2.6' is invalid according to its datatype 'http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition:SchemaVersion' - The Enumeration constraint failed.

Everything seems to be looking at the 2.9 SDK but I can't make the error go away.

Any help would be greatly appreciated, thanks!

From the error message I am assuming that it is a Cloud service(WebRole/WorkerRole) project. The version string is in the first line of your cscfg and csdef files and the error you mentioned is thrown by the ValidateServiceFiles . Towards the bottom of the project file (*.ccproj) there is a import element for the Azure targets; please ensure that the path is pointing to v2.9 targets.

<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.9\</CloudExtensionsDir>

The path resolves to something similar to "C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v14.0\\Windows Azure Tools\\2.9\\Microsoft.WindowsAzure.targets"

If this is not a problem, try a command line build with verbose output. From "Developer Command Prompt for VS 2013/2015"

msbuild /v:d

You should be able to locate the build target that is throwing the error. Most probably it is ValidateServiceFiles target in C:\\Program Files\\Microsoft SDKs\\Azure.NET SDK\\v2.9\\bin\\Microsoft.ServiceHosting.Tools.MSBuildTasks.dll

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM