powershell tf 命令未被识别为 cmlet 的名称 [英] powershell tf command not recognized as the name of a cmlet

查看:32
本文介绍了powershell tf 命令未被识别为 cmlet 的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

tf :术语tf"不被识别为 cmdlet 的名称,函数、脚本文件或可运行的程序.检查拼写名称,或者如果包含路径,请验证路径是否正确并且再试一次.

tf : The term 'tf' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

我设置了环境变量但不起作用.tf 命令适用于 VS2013 的开发人员命令提示符,但不适用于 Powershell.我怎样才能使它起作用?

I set up the environment variable but does not work. tf command works in Developer Command Prompt for VS2013 but does not work in Powershell. How can I make this to work?

推荐答案

您需要包含 tf.exe 完整路径.例如,您想在 PowerShell 中使用 tf checkin 命令检入文件:

You need to include tf.exe full path. For example, you want to check in files with tf checkin command in PowerShell:

$filePath = "C:\Users\username\Source\Workspaces\teamproject\solutionname\projectname\Class1.cs"  
Set-Alias tfs "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe"  
tfs checkin $filePath   /noprompt

这篇关于powershell tf 命令未被识别为 cmlet 的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆