Our ASP.NET Web Api project has two deployment configurations (.pubxml):
- Web deployment directly to Azure Websites.
- Package deployment to a local Zip file.
The Web deployment (1) works just fine. The Package deployment to a zip is failing with the following errors:
Warning 3 No element in the source document matches '/configuration/system.identityModel' 20 10 MyWebProject
Error 4 No element in the source document matches '/configuration/system.identityModel/identityConfiguration' 21 10 MyWebProject
Looking at the verbose logs, I can see it's failing during the Web.config transform.
ParameterizeTransformXml: No element in the source document matches '/configuration/appSettings/add[@key='ida:AudienceUri']'
ParameterizeTransformXml: Not executing SetTokenizedAttributes (transform line 7, 9)
ParameterizeTransformXml: No element in the source document matches '/configuration/appSettings/add[@key='ida:Realm']'
ParameterizeTransformXml: Not executing SetTokenizedAttributes (transform line 10, 9)
ParameterizeTransformXml: No element in the source document matches '/configuration/appSettings/add[@key='ida:FederationMetadataLocation']'
ParameterizeTransformXml: Not executing SetTokenizedAttributes (transform line 13, 9)
Warning : No element in the source document matches '/configuration/system.identityModel'
ParameterizeTransformXml: Not executing RemoveAll (transform line 24, 14)
Error : No element in the source document matches '/configuration/system.identityModel/identityConfiguration'
ParameterizeTransformXml: Not executing Insert (transform line 27, 9)
ParameterizeTransformXml: No element in the source document matches '/configuration/system.identityModel'
ParameterizeTransformXml: Not executing SetTokenizedAttributes (transform line 33, 9)
ParameterizeTransformXml: No element in the source document matches '/configuration/system.identityModel.services'
ParameterizeTransformXml: Not executing SetTokenizedAttributes (transform line 42, 9)
ParameterizeTransformXml: No element in the source document matches '/configuration/system.identityModel.services'
ParameterizeTransformXml: Not executing SetTokenizedAttributes (transform line 45, 9)
ParameterizeTransformXml: Transformation failed
Done executing task "ParameterizeTransformXml" -- FAILED.
Done building target "_TransformWebConfigForAzureAuthenticationCore" in project "MyWebProject.csproj" -- FAILED.
Done building project "MyWebProject.csproj" -- FAILED.
What additional build information do I need to configure to get the Zip deployment past these errors? It works just fine if I do a direct web deployment.