Have a folder with dynamic content automatically controlled by TFS - version-control

I have a web project that has a folder with dynamic generated content with 4000+ files, and those files must be on source control.
I would like these files to be automatically included in the project so I can upload them to source control instead of me having to track them down and add them to project.
An option would be to exclude all and them re-include them before a check in but it takes too much time in Visual Studio.
Another question, can I solve it if I use GIT instead of TFS source control?

Using GIT, when you open a version controlled project, you'll see the new added files will appear in "Untracked Files" in "Changes" tab, after selecting "Add All", the new added files will be added and ready for Commit. Check: http://incyclesoftware.com/2013/08/version-control-with-tfs-2013-git-repository/
Using TFVC, you can add new files from VS, or TFS Power Tool, or use tf.exe command line. Check http://www.asp.net/web-forms/overview/deployment/configuring-team-foundation-server-for-web-deployment/adding-content-to-source-control and http://nullablecode.com/2013/01/tfs-windows-shell-tfs-power-tools/

Related

When I add a solution to source control in VS 2019 Azure Devops only the startup project gets added - how do I add the others?

I am working on a solution that has 14 projects (so far) in it. I added the solution to Azure Devops source control and can see that the solution and the startup project have the little locks in the solution explorer, also I can see the startup project files in the devops repo, but I can't see how to add the other projects. Obviously I messed up somewhere, since ideally the repo would contain a folder for the startup project rather than the files themselves, but I don't know how to "undo" the source control and reset my solution back to its original state.
Can someone tell me how to either fix the source control so that the master branch contains all of the projects in sub-folders (as per the visual studio folder structure) - i.e. how to move the startup project files in the devops repo to a sub-folder and how to add the other projects to their own sub-folders, or, failing that, how to undo the source control so that all of my solution files are back on my local hard disk?
Any advice will be appreciated.
You mentioned that you are using git. So when you DO NOT have local changes which are not pushed to your git server, that means everything is "synced".
Make a backup of your folder, just copy & paste everything!
You can just delete the .git folder. So you have no "link" to the git server anymore.
You can the link the "folder" again to your git server, with sth. like:
git remote add origin https://YOURNAME.visualstudio.com/YOURPROJECT.git
Other option is check your .gitignore file, maybe some of your projects are excluded.
When you are working with Visual Studio, can can also create a new empty solution and add the projects one by one. Also be sure that there is NO Filter in Project Explorer in Visual Studio.
You can also check your git changes, with git log or git status from any terminal or command line tool.

What is the Difference between folder and workspace?

"There are two options in vscode namely "Open Folder" and "Open WorkSpace". What is the difference between them? When should we use folder or workspace?
vscode --> WorkSpace
In workspace we have privilege to save our setting at the workspace level, not only this here you can open multiple folders in a workspace.If you want to do either of those things, use a workspace, otherwise, just open a folder.
In vscode there is list of project's folders and files.A workspace can contain multiple folders. You can customize the settings and preferences of a workspace.
A workspace is a folder, or multiple folders, mapped to areas in TFS. When code is checked out of TFS, the code is stored locally based off your workspace mappings. When you make changes to your code files, you are making those changes locally, to the files contained in your workspace.
One of the main reasons for workspaces is isolation. It provides a private sandbox where code changes can be made without having to worry if the changes will affect other team members. The changes remain in the local workspace until are checked into TFS.
TFS was designed to allow for one or more workspaces on the same machine. A single workspace can be created that contains multiple team projects and their code, or a more targeted workspace that only contains a particular project. There is no hard and fast rule for the best way to create workspaces. It will depend on personal preference, methodology, environment and the like.
Reference
vscode --> folder
When we want to work on single folder irrespective of their dependencies or in-dependencies and when we wants to opens a new instance of VS Code scoped to the selected folder OR to the folder containing the selected file.
Reference
The VSCode 1.53 (Jan. 2021) mentions the new article "What is a VS Code "workspace"?"
What is a VS Code "workspace"?
A Visual Studio Code "workspace" is the collection of one or more folders that are opened in a VS Code window (instance).
In most cases, you will have a single folder opened as the workspace but, depending on your development workflow, you can include more than one folder, using an advanced configuration called Multi-root workspaces.
The concept of a workspace enables VS Code to:
Configure settings that only apply to a specific folder or folders but not others.
Persist task and debugger launch configurations that are only valid in the context of that workspace.
Store and restore UI state associated with that workspace (for example, the files that are opened).
Selectively enable or disable extensions only for that workspace.
You may see the terms "folder" and "workspace" used interchangeably in VS Code documentation, issues, and community discussions.
Think of a workspace as the root of a project that has extra VS Code knowledge and capabilities.
Note: It is also possible to open VS Code without a workspace. For example, when you open a new VS Code window by selecting a file from your platform's File menu, you will not be inside a workspace. In this mode, some of VS Code's capabilities are reduced but you can still open text files and edit them
The same article adds:
What is the benefit of multi-root workspace over a folder?#
The most obvious advantage is that a multi-root workspace allows you to work with multiple projects that may not be stored inside the same parent folder on disk.
You can pick folders from anywhere to add to the workspace.
Even if you are mainly working in a single-folder-based project, you can benefit from using .code-workspace files.
You can store multiple .code-workspace files inside the folder to provide a scoped folder-view of certain aspects of the project depending on the scenario (for example client.code-workspace, server.code-workspace to filter out unrelated folders from the File Explorer).
Since .code-workspace files support relative paths for the folders section, these workspace files will work for everyone independent of where the folder is stored.
Finally, if for some projects you want to apply the same set of workspace settings or tasks/launch configurations, consider adding these into a .code-workspace file and add/remove these folders from that workspace.

Eclipse Team Synchronizing View: How to remove unversioned items in outgoing changes?

While viewing the outgoing changes in Eclipse Team Synchronization(Subclipse), I am able to see the unversioned files also, like the generated class files, build folders, etc, which I do not want to see in this view. I dont want to add it to svn:ignore, since I have to do it manually for all the additional folders generated.
Is there any setting to change this to show only versioned files in this mode always?
Tortoise SVN client shows this option while committing, to show only versioned files. I am looking for such an option in Subclipse Team Synchronization view. Thanks in advance.
eclipse_outgoing_view
You should svn:ignore build folders.
Otherwise it's only a question of time until you or your colleague checks in the build folder
You should use svn:ignore, and note that once you do for a folder, all child folders are automatically ignored. In your example, if the build folder were ignored then everything inside it would automatically be ignored. It looks like your build folder has already been added to repository though, so maybe you can ignore the dist folder inside bin.

eclipse import folder(s) (tfs)

i have a folder which is inside a tfs source control.
It is not a Java Project or any Project at all. Just some files.
In my tfs plugin i can open source control explorer and navigate to this folder and edit those files (check out for edit is applied).
I find this very annoying and would like to have the folder show up in my Eclipse workspace explorer.
Is it possible to import this folder in Eclipse, to make them show up in my workspace (i don't want a copy of the folders in my workspace location, only a link to the diretory)?
No, this can't be achieved.
In Team Explorer Everywhere 2010, you cannot open a linked source code
file. The Open button in a work item remains dimmed if you select a
versioned item link.
Source: Open Projects from Version Control (Team
Explorer Everywhere)
To be a workaround, you may need to get a local copy of files from Source Control Explorer. And manage these files in the local and check the changes in source control. Detail steps please refer the link from MSDN.

Netbeans & Mercurial - Project Tree Not Updating with Pull

I use Netbeans (7.3), Mercurial, and BitBucket (BB) for personal version control and backup, and also as a way to switch between my work laptop and home desktop. I'm still learning Mercurial, so I created a C++ test project in Netbeans on my desktop and created the BB repository. On my desktop, I init the Mercurial project, commit, and push to my default BB repo, all using Netbeans's GUI commands (no command line Hg commands). My project consists of main.cpp, Person.h, and Person.cpp, where I do some trivial object creation and "cout" to print some strings (print name of Person, "Dave").
On my laptop, I clone the repo from BB to a local directory and open the project in Netbeans. I get the three files as part of my Netbeans project. Now I create a new object, Computer.h and Computer.cpp, and I commit/push to BB... five .h/.cpp files all total in my Netbeans project now.
Back to the desktop: inside Netbeans, I "Pull from Default" and then "Update". When I do this, I can see (Windows explorer) that the new Computer.h/.cpp files were pulled down into the directory, and my main file now shows the changes using the Computer object (print name of Person, "Dave", and name of Computer, "Hal"). The problem is, even though my main file is up-to-date and my project compiles and behaves like it should with the new code, my Netbeans project tree does not show the new Computer.h/.cpp files. I have to "Add Existing Files..." manually to get the new files into the project tree. It's fine when I only add one or two files at a time, but I have a bigger project with a lot more source files, and I can't keep up with how the project tree changes. How can I get the Netbeans project tree to update and reflect the actual file changes that have taken place (additions and deletions to project)? Thanks in advance!
Ensure that your netbeans is configured to store the project file membership under the source directory for your project, (probably in a nbprojects sub-directory), and add some or all of the files in that to your project, (I would look for the file that lists the project members only).
N.B. you will either have to ensure that netbeans is using relative paths or that you have the same paths on both machines, (preferably the former).