1. 首页
  2. 主题
  3. Go开发工具

Visual Studio Code 运行go文件出现

yixiang · · 6559 次点击
PS D:\Go_WorkSpace> go run test2.go go : 无法将"go"项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1 + go run test2.go + ~~ + CategoryInfo : ObjectNotFound: (go:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS D:\Go_WorkSpace> go run test2.go go : 无法将"go"项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1 + go run test2.go + ~~ + CategoryInfo : ObjectNotFound: (go:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS D:\Go_WorkSpace>
好哒!,谢谢你,问题解决了
#2
更多评论
你的goroot/bin有没有加到path里面,应该是系统找不到go.exe这个程序,你把路径加到path里,如下: ![WeChat截圖_20191226095743.png](https://static.studygolang.com/191226/cb733ab8ef207c01b157f19ac39346a6.png)
#1
Mark! [Climbing Blocks](https://www.xjd.com/c-Climbing-Blocks/)
#3

用户登录

没有账号?注册

今日阅读排行

    加载中

一周阅读排行

    加载中