Windows Azure Web Sites Deployment Error

I was trying to deploy a simple ASP.NET Web Application to test out Windows Azure Web Sites just now and have encountered a mysterious error. While trying to publish, Visual Studio 2012 throws the following error:

The "TransformXml" task failed unexpectedly.
System.UriFormatException: Invalid URI: The URI is empty.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at System.Uri..ctor(String uriString)
   at Microsoft.Web.Publishing.Tasks.TransformXml.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext()

I suspect it was something to do with the web.config file. I proceed to delete the Web.Debug.config and Web.Release.config. I was then given the following error instead:

The "ParameterizeTransformXml" task failed unexpectedly.
System.UriFormatException: Invalid URI: The URI is empty.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at System.Uri..ctor(String uriString)
   at Microsoft.Web.Publishing.Tasks.ParameterizeTransformXml.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext()

I was in a rush and couldn't solve it. I then decided to just delete off the web project, recreate it and re-add back all my .aspx and code files. Doing that solves the issue and I am able to deploy my Azure Web Site.


No comments:

Post a Comment

Popular Post