Visual Studio Online TFS refuses to “source control” filenames starting with $

旧街凉风 提交于 2019-12-10 20:44:12

问题


A bit of Background: I've migrated 3 old projects on a Win2003server to a Win2008R2 server (saying goodbye to IIS 6, VS2008, and Visual SourceSafe!). This Visual Studio 2012 solution with the 3 projects compiles and runs OK but I need to make some minor changes. Before I do much more, I am trying to add these projects to "source control" (TFS 14.0 with a local workspace). Two projects were added without problems. The 3rd project won't allow some items to be added to the team project folder and gives this message:

TF10122: The path ‘$/MDW/MortgageDataWeb/MDS/$Common/$BuildNaviagator.asp’ contains a ‘$’ at the beginning of a path component. Remove the ‘$’ and try again.”

The local path of this old classic ASP project is D:\Projects\MortgageDataWeb\MDS and one of the subfolders is named $Common and within that are dozens of files beginning with a $ in the filename and the filetype is .asp.

I've done lots of research on this error message and I am deducing that the filenames and folder names in this project cannot begin with (nor contain??) any dollar signs. Most every explanation points at something about "Build Definitions" and Workflow 4.0 issues which I don't really understand.

The code was written about 9 years ago and I would be very reluctant to attempt global source code changes to hack out the offending $ from the item names.

Is there anything simple I could do to get this project added to TFS so I can move forward with my minor changes and be able to track things with TF version control? I'm not ready to need full-blown ALCM features (just want to view pending changes, check in, compare differences, etc.).

Edit: Regarding versions of TFS, I followed advice from here:

https://msdn.microsoft.com/en-us/library/ms181475.aspx

Included there is a question about how to find version:

A: From a web browser and for an on-premises TFS, enter the following address: http://ServerName:8080/tfs/_home/About. For Visual Studio Online, enter the following address: http://AccountName.visualstudio.com/_home/About.

So, I did this on my development server and got this which looks like 14 to me:


回答1:


The message in the exception is correct. Per Naming Syntax, Conventions, and Limitations:

Most names in Team Foundation version control cannot begin or end with spaces or tabs. Any character can be used for names or labels, except

...

A dollar sign ($) cannot be the first character in a file name.

There is not a workaround. You cannot place files with those names in TFVC.



来源:https://stackoverflow.com/questions/28463171/visual-studio-online-tfs-refuses-to-source-control-filenames-starting-with

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