启动前任务构建以退出代码1终止 [英] Prelaunch task build terminated with exit code 1
问题描述
我正在尝试学习如何创建方法库,但是每当我运行程序时,都会弹出一个弹出窗口(带有令人惊讶的基本Windows图形界面,更新后),并显示消息"PreLaunch task'Build'以退出代码1终止."
I'm trying to learn how to create method libraries but whenever I run my program a little pop-up window (with a surprisingly basic Windows graphical interface, post-update) shows up with the message "PreLaunch task 'Build' terminated with exit code 1."
我单击显示错误",然后在问题"选项卡中看到消息到目前为止工作区中没有问题."
I click on "Show error" and in the "problems" tab I see the message "No problems in the workspace so far."
有人知道发生了什么事吗?
Does anyone know what's going on?
这是我的启动配置...
Here are my launch configurations...
这是带有消息的弹出窗口的屏幕截图.
Here is a screenshot of that pop-up window bearing the message.
此外,我不确定是否与此相关,但是我注意到在将.NET SDK文件移动到另一个文件夹后,以及调试快捷方式命令停止工作后,这些东西开始发生.
Also, I'm not sure if this is related but I noticed that this stuff started happening after I moved the .NET SDK files to another folder, and also when the debugging shortcut command stopped working.
推荐答案
重命名我的项目后,我遇到了相同的错误.问题是在我的 task.json 文件中,参数引用了我先前的项目 csproj 文件.
I encountered the same error after renaming my project. The problems was that in my task.json file, the arguments were referencing my previous project csproj file.
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/MyOldProject.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
`
我将csproj文件名更改为可以正常工作的当前项目的名称.
I changed the csproj file name to the current project's name it worked without any errors.
这篇关于启动前任务构建以退出代码1终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!