完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
可能是 vscode 的问题,但我看过但无法让它工作。
我在 Windows 上使用 vscode 来验证/上传图像,我希望添加一个预构建任务 (UpdateVer) 以使用小型 powershell 脚本更新软件版本,我在具有 dependsOn 依赖项的任务中添加了一个部分,但我无法获得它运行 - 我已经添加了一个更简单的任务(称为预构建)来检查事情,这也不会运行。 请问我哪里错了? 代码: // See // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "UpdateVer", "detail": "Update the FIRMWARE_VERSION", "type": "shell", "command": "./../scripts/updateversion.ps1", "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": true, "clear": false } }, { "label": "pre-build", "type": "shell", "command": "git describe --long > '${workspaceFolder}/version.txt'" }, { "label": "build", "type": "shell", "command": "msbuild", "args": [ // Ask msbuild to generate full paths for file names. "/property:GenerateFullPaths=true", "/t:build", // Do not generate summary otherwise it leads to duplicate errors in Problems panel "/consoleloggerparameters:NoSummary" ], "group": "build", "dependsOn": ["pre-build", "UpdateVer"], "presentation": { // Reveal the output only if unrecognized errors occur. "reveal": "silent" }, // Use the standard MS compiler pattern to detect errors, warnings and infos "problemMatcher": "$msCompile", } ] } |
|
相关推荐
1个回答
|
|
|
看起来你已经正确地定义了你的 tasks.json 文件,但实际运行任务时出了问题。有几个可能的原因:
1. 依赖项未正确定义或未满足条件。请确保您的 UpdateVer 任务的 dependsOn 属性指向正确的任务,并确保先前的任务已成功完成。 2. 路径和命令不正确。请确保您指定了正确的命令和路径,以便可以正常运行您的脚本。 3. 权限问题。请确保您有足够的权限运行 PowerShell 脚本,并且您的 vscode 设置中没有任何阻止您运行预构建任务的设置。 4. 文件格式问题。请确保您的 tasks.json 文件的格式正确,并且没有任何错误或拼写错误。 如果您尝试了这些解决方法但仍然无法解决问题,请考虑查看输出面板以了解任何其他错误或警告。您还可以在社区寻求帮助,以了解是否有任何其他人遇到类似的问题。 |
|
|
|
|
只有小组成员才能发言,加入小组>>
462 浏览 0 评论
982 浏览 0 评论
1703 浏览 0 评论
请问一下我想用ESP8685直接替换ESP8266而不用写程序,可以让ESP8685直接通过之前ESP8266的外挂的flash运行程序吗
1359 浏览 1 评论
1249 浏览 1 评论
为blufi_device设置自定义名称,但是无法修改,为什么?
1278浏览 4评论
请问ESP32-S2-WROOM怎么获得ESP32-S2外接FLASH的唯一序列号?
942浏览 3评论
2372浏览 3评论
ESP-IDF的VScode插件的build按钮点击会报错的原因?
2564浏览 3评论
ESP-Jumpstart例程中第5个工程:5_cloud连接报错是哪里的问题?
1069浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-11 08:23 , Processed in 0.727278 second(s), Total 72, Slave 55 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
734
