I'm trying to convert xaml builds to TFS 2015 builds and running into a problem where the build seems to almost complete but then trows the following error:
And just in case you can't see the image, the error is:
Finishing task: VSBuild
System.NotSupportedException: The given path's format is not supported. at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath) at Microsoft.TeamFoundation.DistributedTask.Agent.Common.ContextExtensions.GetExpandedPath(ILogServiceContext context, String path, String defaultPathRoot) at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.ResolveInputs(IJobContext context, IJobExtension jobExtension, TaskWrapper task, IDictionary`2 variables) at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.Run(IJobContext jobContext, IJobRequest job, IJobExtension jobExtension, CancellationTokenSource tokenSource) Worker Worker-44f37a2f-ff1b-43a7-b619-88373a8687c0 finished running job 44f37a2f-ff1b-43a7-b619-88373a8687c0
Finishing Build
It doesn't give me any clues as to where the code is that's causing this error so I really don't know where to look. When I look in the c:\Agent_work\5\a folder it looks like the project is building just fine (although I have no way of verifying that). But all of the files seem to be there including a subdirectory created by an .exe called in the Post-build event on the last .csproj file in the solution which I never even expected to be called and run in TFS 2015! Who knew - that's great! Now if I could just get my build to start working...
I figured it out. It was simply the trailing backslash on the source folder. I had $(build.artifactstagingdirectory)_PublishedWebsites\BOTWSitecoreWeb\ when it should have been $(build.artifactstagingdirectory)_PublishedWebsites\BOTWSitecoreWeb. I just happened to guess this was it - there was no help from the logs.