tfs build not copying latest config files to drop folder - version-control

I have several config files in different projects in my master solution that are set to "Copy if newer" that tfs build is not getting the latest for on each build.
I currently have the build configuration option "Clean Workspace" set to "All". I would think it would be copying the latest files from TFS but it is not. It is getting prior versions.
Furthermore the build folders on my local machine reflect the latest files from TFS. Is there a setting I am missing somewhere?

I managed to find the problem and it didn't have anything to do with TFS. I had multiple versions of the same config file in various projects within my solution.
To correct this I added a single configuration file at the solution level and added it as a linked file in all the projects where I needed it.
How to Share App.config?

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.

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.

TFS unable to ignore tracked files

I'm using Eclipse (Spring tool suite to be exact) for a Maven project and the TFS plug-in v14. I'd like to ignore some files which are tracked by TFS, as they'll change between development machines. However, despite adding all files to be ignored to .tfignore, they are still detected as pending changes.
For instance, the following files are present on the project root:
.classpath
.project
.springBeans
.tfignore
pom.xml
The tfignore file:
\.project
\target
\src\main\resources\profiles\DEV
\.tfignore
\.classpath
\.settings
\.springBeans
I've also tried adding \.*, .springBeans. I've tried checking in the tgignore file before any changes as well, all to no avail.
Excluding changes only works temporarily as when switching branches, all changes must be shelved or undone.
When performing the same operation through the Eclipse context menu for TFS (Team > Ignore) the error "Exclusions could not be added for some items
Error adding exclusion for C:\Users\user\Documents\workspace-sts-3.6.3.SR1\VTS\.springBeans parentPath must not be null" is shown
For the \src\main\resources\profiles\DEVpath, I'm able to cloak the folder server side, but am not able to do so with files in the root of the project (this would cloak the entire project). The option to cloak individual files is not listed through TFS.
Is it not possible to ignore files locally from source control once they're added? I would expect this to be possible.
After researching a bit, I've found that tracked files cannot be ignored by Team Explorer Everywhere TFS Eclipse plug-in. The source will need to be cloaked to ignore local changes from being detected under pending changes.
As for files in the root of the project which change based on a developer's environment, these should be removed from source control all together. Initial setup of the environment should produce these derived files (setting this flag in Eclipse also has no effect on tracked files). Once placing these in .tfignore, the plug-in ignores these as expected.

How to ignore dll files in tfs after exclusion?

I have got 8 projects.
Projects referencing each other.
I exclude all dll files of my own projects from sourcecontrol
But every build the dlls gets changed and tfs enters into the conflict mode.
I want to avoid it.
is that possible ? And how ?
Thanks
PS: Tomorrow is my birthday this would be a great present
Delete those DLL's from TFS source control. Probably they are checked in once and now TFS will try to update them constantly when they change.

How remove a folder(BIN) from version control, and make it stay out in TFS?

We have a new ASP.NET project on VS 2008 environment, and a new TFS server was setup for it, but originally the bin folder of the project also got checked-in.
The team has about 10 active developers at a time and it a big issue now as some of the common libraries remains checked-out by someone or other.
As per the best practice, I now wish to fix this issue and remove the bin folder out of the version control AND I need to ensure that from now on, when a developer checks-in his project, the bin folder again does not gets checked-in. How do I ensure the both things with the correct approach? It would be great if I can do something as an TFS Admin so that from the next day all developers automatically get some settings pulled into their boxes so that they stop checking-in the bin folder once I have removed it from TFS control.
I am a beginner in TFS, as earlier I used SVN primarily, so please point me to the proper steps, documentation. Thanks!
Delete the bin folder in solution explorer, this will add a delete to the pending checkins.
A build should re-create the bin folder, but not add the folder to the project (and thus there'll be no prompting for it to be added to version control).
This won't prevent someone adding it (or anything it contains) back into version control outside of VS (eg. from the command line, or adding the bin folder back into a project). I don't think there is anything you can do to stop arbitrary files being added except training (if your developers cannot handle this, how do they handle all the other "don't do that"s associated with development?)
Updated, since this was written TFS (including VSTS and Visual Studio1) allow files and folders to be ignored via a .tfignore file.
1 Often Visual Studio does not pick up changes to the .tfignore file, needing a restart.