Exception Message: There is no working folder mapping for

被刻印的时光 ゝ 提交于 2019-12-23 06:48:49

问题


I am trying to test automated builds in tfs/vs.net 2012. I have set the workpaths in the source control explorer but now I am getting an error:

Exception Message: There is no working folder mapping for $/testing/buildtest. (type ItemNotMappedException)


回答1:


I had the same problem. Turned out I had forgotten to expand the Items to Build section of the Process tab. To fix you need to:

  • Edit build definition
  • Open Process tab on left
  • Open the 1. Required section

    • open up Items to Build
    • ensure the Projects to Build is pointed to the correct .sln




回答2:


You need to map the root of the team project (in your case "testing) which is not done.

The local path should be "c:\dev\testing\buildtest".

How is your BuilDefinition setup?




回答3:


This can also happen if you forget to include your parent folder of the source code in the Source Settings in the build definition.

 $/Source/Code/ParentOfSolution

Working folders basically creates a white list of files for the build to look at and use so it needs to contain your source code that is referenced by your sln and any DLL's that your code references.




回答4:


In my case clicking on the Build Agent Folder (...) button revealed that the $(SourceDir) wasn't set, indicating the mapping was broken.




回答5:


In my case the exception message "There is no working folder mapping for xxx." was thrown at Microsoft.TeamFoundation.VersionControl.Client.Client.GetLocalWorkspace(String localPath, Boolean throwIfNotFound) out of my own code:

var changesets = myRealTfsServer.QueryHistory( path, versionSpec, 0, RecursionType.Full, null,  new ChangesetVersionSpec( 1 ), versionSpec, 2, true, true, false, false );

My solution is to use the TFS path '$/' to specify the path parameter, which is actually not as declared in this page in MSDN which says this path should be a local path.



来源:https://stackoverflow.com/questions/18751959/exception-message-there-is-no-working-folder-mapping-for

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