Michel:
I don't think this is a bug, it's just the way TFS works. We are using TFS (although looking hard at switching to Git). We use a Powershell script to execute the TF command line to find and pend (add) the files, and open the GUI check-in dialog.
I've also attached the script as a text file.
<#
Use TF to add files to TFS.
This type of script is helpful when using code generators that add files outside of Visual Studio.
This script makes some assumptions about script/folder locations but can be easily modified.
The folder structure assumed for this script is:
Parent Folder
This Powershell script
The LLBLGen Project file
GeneratedCode
DatabaseGeneric Project Folder
EntityClasses
EntityCustomization
FactoryClasses
...
DatabaseSpecific Project Folder
ActionProcedures
DataAccessAdapter
...
#>
$scriptPath = Split-Path ((Get-Variable MyInvocation -Scope 0).Value).MyCommand.Path
$solutionFolder = (Split-Path $scriptPath)
$projectFolder = $scriptPath
$projectFile = Join-Path $projectFolder "YourProjectFileName.llblgenproj"
#change this to match your version of TF
$tfExePath = "${env:ProgramFiles(X86)}\Microsoft Visual Studio 12.0\Common7\IDE\TF.exe"
# cd to the directory containing your project.
Push-Location $projectFolder
Write-Host "Working directory:" $projectFolder
Write-Host "Pend new files"
[Array]$arguments = "folderdiff", $projectFolder, "/recursive", "/view:targetOnly"
#change the regex pattern to match your folder structure
& $tfExePath $arguments | sls -Pattern ".*Database.*(\.vb$|\.cs$)" | % {
if($_ -notmatch ".*(\\bin\\|\\obj\\).*") #ignore anything in bin or obj folders
{
Write-Host "Add New file: $_"
& $tfExePath add "$_"
}
}
Write-Host "Check in for the specified folders"
#this will open the TFS GUI check-in dialog
[Array]$arguments = "checkin", "/recursive", "YourGeneratedCodeFolderName", $projectFile
& $tfExePath $arguments
Attachments
Filename |
File size |
Added on |
Approval |
TFS-Pend.txt
|
1,763 |
06-Jun-2016 22:39.54 |
Approved |