benjy
benjy

Reputation: 4716

Publishing TFSService build to Azure fails with DirectoryNotFoundException

I have my TFSService account hooked up to my Azure account, and am trying to publish the results of a TFSService build to my Azure account. Pretty sure I have my build definition set up properly - everything compiles just fine, which is great, but every time I try to deploy, I get the following error:

Exception Message: Could not find a part of the path 'C:\a\bin\_PublishedWebsites'. (type DirectoryNotFoundException)
Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Anyone have any idea what could be wrong? For the record, manually publishing via right-clicking on my project in Visual Studio works fine (and is using the same publish profile) so not really sure what the deal is. I also am not 100% what info would be helpful for folks to use when debugging, so please just let me know what you guys would like to see and I'll update the question.

Thanks.

Upvotes: 2

Views: 1640

Answers (2)

jalanubha
jalanubha

Reputation: 21

This error occurs when the output location is set incorrectly. The value for output location can be either "AsConfigured", "PerProject" or "SingleFolder". http://msdn.microsoft.com/en-us/library/dd647547.aspx#output

For ex. If you have a single project with one configuration setup in the template the output location is set to SingleFolder.

Upvotes: 1

benjy
benjy

Reputation: 4716

I fixed this by simply deleting the TFS integration in Azure and associated build configs in TFS, and then re-added.

Upvotes: 1

Related Questions