The path $/FullStackSampleApplication is not a file. (type InvalidOperationException)

北城以北 提交于 2019-12-11 06:48:23

问题


I have created a new build definition with a custom activity. I modified the AzureContinuous deployment xaml as explained here:

http://www.ewaldhofman.nl/post/2010/06/01/Customize-Team-Build-2010-e28093-Part-10-Include-Version-Number-in-the-Build-Number.aspx

And here a problem I had before but I could solve it: 'AssemblyInfoFileMask' is not declared. It may be inaccessible due to its protection level

When I queue a new build I got the exception The path $/FullStackSampleApplication is not a file. (type InvalidOperationException)

I tried deleting the build definition and creating from scratch with no success.


回答1:


Assumption is that your passing empty or improper AssemblyInfoFileMask string to activity , the error is returned from TFS api trying to download files with incorrect server path. Going by you linked article, assembly items are searched in your workspace mapping scope

foreach (var folder in workspace.Mappings)
{
    // Get all files (recursively) that apply to the file mask
    ItemSet itemSet = vc.GetItems(folder.ServerItem + "//" + assemblyInfoFileMask, RecursionType.Full);

this would return you all assembly info files, if you omit the assembly mask however it will return you everything including folders inside your workspace, once that path is passed to download method later it fails with error as you pass item of type folder to it

item.DownloadFile(localFile);


来源:https://stackoverflow.com/questions/16031434/the-path-fullstacksampleapplication-is-not-a-file-type-invalidoperationexcep

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!