Warning displayed when adding solution to Team Foundation Server 2010

余生颓废 提交于 2019-12-03 04:02:37

问题


I'm just getting to grips with TFS 2010 (never had any luck with TFS 2008) and I'm trying to add my first solution into TFS. However I am getting the following warning message:

The project that you are attempting to add to source control may cause other source control users to have difficulty opening this solution or getting newer versions of it. To avoid this problem, add the project from a location below the binding root of the other source controlled projects in the solution.

Can someone explain to me what this means and how to resolve it? This warning is displayed when right clicking on the solution in Solution Explorer and selecting "Add to Source Control".


回答1:


Your solution folder structure should resemble:

Solution Root folder
    | 
    .sln solution file       
    |
    Project1 folder
         |
         Project1.csproj   (or .vbproj)
    |
    Project2 folder
         |
         Project2.csproj   (or .vbproj)
    .
    .
    .



回答2:


As described in this Visual Studio forum post (link below), the basic issue is that a project in the solution is outside of the sub-tree that the solution itself is in. This can possibly lead to problems if another user maps the different subtrees differently in his workspaces than the user that is checking in. The cross-tree references will no longer work. The dialog is only a warning, but can be continued if you know your team doesn't split up the code tree with complex workspace mappings.

https://social.msdn.microsoft.com/Forums/vstudio/en-US/29579a28-9de0-4fc6-a253-b38191aa4fdc/must-projects-be-added-under-binding-root-of-solution?forum=tfsversioncontrol




回答3:


For me it was like this that I tried to add the solution from another location already. I then had to clean the workspace which was created for the other location.

For Visual Studio 2013 you can find the workspace settings under:

File -> Source Control -> Advanced -> Workspaces...
  1. On the Manage Workspaces dialog select your workspace you work with
  2. Hit Edit....
  3. On the Edit Workspace <yourworkspacename> dialog
  4. clear the "wrong" location

Try to add the solution again.




回答4:


The following issue can sympomatically manifest the error you reported. Remember, referenced assemblies need not be in any specific location in either TFS or in the file system of your workstation.

An underlying problem is that some types of projects default to the "Client" version of the targeted .NET Framework. The Client versions strip out assemblies that are usually not used in deployable projects. Furthermore, any assembly your project references must also not reference assemblies omitted by the Client profile.

Simply change the Target framework setting of your project to the full framework version.

Check out my blog post, regarding this issue: http://thecurlybrace.blogspot.com/2010/09/visual-studio-wears-sabots.html



来源:https://stackoverflow.com/questions/934263/warning-displayed-when-adding-solution-to-team-foundation-server-2010

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