问题
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