原因:
.vscode\launch.json中有一个参数:
"preLaunchTask": "build",
每次运行向前会跑这个task,
(帮你把项目dotnet build 一下)
看看tasks.json是否有这个,没有就写一个,有可能名字不对,需要修改为"label": “xxx”, xxx同名
{
"label": "debug build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}\\AA.bbb.ccc.ddd.csproj",(改成自己的)
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},