Visual Studio and TFS, detect changes outside Visual Studio [duplicate]

我与影子孤独终老i 提交于 2019-12-08 03:05:50

问题


Im Working with Visual Studio 2015 with an ASP.NET Web Application, with Umbraco and uSync installed. It's not essential what uSync and Umbraco are, but when I start the project and create a Template in Umbraco, uSync writes "export"-files to a specific folder in the project path.

Now Visual Studio doesn't list the new, changed or deleted files under pending changes, so i can't check-in my changes.

Is there a way to tell Visual Studio to always track created, removed or changed files in specific folders of the project?

Yeah, i could always manually include the files to the project, but this could cause errors when I miss a file or when someone works with this solution and doesn't know he has to include them manually.

There are also other files that I don't need to check in so I need a solution to specify, which folders Visual Studio should track and not something how to track everything going on in the whole project path.


回答1:


You just need to create a local workspace and not a server Workspace.

Then all files edited outside your solution get detected:

Picture: Pending Changes with detected adds

Then i include the detected adds, so they are under Included Changes. Now i can check-in all the changed files, but at this time they are in source control but not included to the project. So I add the lines like described at this link:

http://www.mattburkedev.com/automatically-include-all-files-in-folder-in-visual-studio/

Then I unload the Project and Reload it. The files are now included.

So next time I add files in Umbraco: just add detected adds in Pending Changes and reload project, everything done.




回答2:


Well, no. That's the nature of a Web Application project type. But if for instance you used a Website project instead, all files in the main folder would automatically be part of your project.



来源:https://stackoverflow.com/questions/38197673/visual-studio-and-tfs-detect-changes-outside-visual-studio

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