I am not seeing TFVC option in version control while creating a new project at dev.azure.com. Only git option is available. How to get TFVC option?
Check this setting in your org:

Generally, you should be able to see Team Foundation Version Control when creating a new project after disabling Disable creation of TFVC repositories in the organization settings.
If you still can't create a TFVC repo, try to use REST API Projects - Create. You can use the following PowerShell scripts. Replace the placeholders with your actual values.
$token = "{PAT}"
$token = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$($token)"))
$url="https://dev.azure.com/{OrganizationName}/_apis/projects?api-version=7.1-preview.4"
$body = @'
{
"name": "{ProjectName}",
"description": "{ProjectDescription}",
"capabilities": {
"versioncontrol": {
"sourceControlType": "TfVc"
},
"processTemplate": {
"templateTypeId": "adcc42ab-9882-485e-a3ed-7678f01f66bc"
}
}
}
'@
$head = @{ Authorization =" Basic $token" }
Invoke-RestMethod -Uri $url -Method Post -Headers $head -Body $body -ContentType application/json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With