Build error during preLaunchTask 'build'.
Whenever I press F5 to debug an RC2 ASP.Net app, I get the following error in a bar along the top:
Build error has been detected during preLaunchTask 'build'.
with a 'Debug Anyway' and 'Close' option.
I encounter the issue every time.
Build outputs associated with this:
Project Project.Omega (.NETCoreApp,Version=v1.0) will be compiled because Input items removed from last build
Compiling Project.Omega for .NETCoreApp,Version=v1.0
Compilation succeeded.
0 Warning(s)
0 Error(s)
Time elapsed 00:00:01.3013499
Project Project.Omega (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
VS Code:
[Window Title]
Visual Studio Code - Insiders
[Main Instruction]
Visual Studio Code - Insiders
[Content]
Version 1.1.0-insider
Commit c212f0908f3d29933317bbc3233568fbca7944b1
Date 2016-05-09T13:09:51.092Z
Shell 0.37.6
Renderer 49.0.2623.75
Node 5.10.0
omnisharp-vscode package: csharp-1.0.5-rc2.vsix
In the project, I'm using Microsoft.NETCore.App version 1.0.0-rc2-3002700.
Debug Anyway works, but it's a pain to have to click that every time.
Strangely enough, the issue stopped when I selected the (web) configuration in the debug tab, and I haven't been able to replicate it since.
I just ran into this myself. Changing the launch configuration didn't help for me though, restarting VS Code made the issue go away.
If you run into this on Windows, please try using Process Monitor to check the exit from dotnet.exe. Then we can know if this is a bug in VS Code (they are claiming the task failed for no reason), or a bug in the .NET CLI (they are exiting with non-zero exit code on success).
I'm hitting the same issue. dotnet.exe is returning with exit code 0 according to Process Monitor.



@mellinoe if you go to 'View->Errors and Warnings' does VS Code show you any errors?
This sounds like it might be https://github.com/Microsoft/vscode/issues/4987
Looks like there is another active issue that also sounds the same: https://github.com/Microsoft/vscode/issues/4070
Hm, I'm not able to get a repro at this exact moment. If I hit this again i will check that panel.
I had the same issue on OSX. Restarted after updating C# extension and the asset installtion and it went away
Has anyone seen this in awhile? It feels like this issue might be a bit stale.
I have seen this issue with this repro https://github.com/OmniSharp/omnisharp-vscode/issues/352
Ah... Are these tracking the same thing then? This issue stuck out to me because it didn't have any labels or a milestone.
@rajkumar42 this bug tracks the scenario where VS Code claims that the build fails, but it actually succeeded. Is that what you saw?
This behavior shows up on Windows only. In my case the build actually failed, it did not update the dlls.
Its quiet different on mac, where it somehow creates a zero sized file.
Is this still a problem?
I'm having the exact same problem with version 1.10.2 ;(
Same goes here.
@damtur and @cihadsevim what OSs are you guys on? What version of VS Code do you have?
@gregg-miskelly Windows 8 VS version 1.10.2
@cihadsevim can you repro this problem regularly? If so, could you try running procmon to verify that indeed dotnet (or whatever process you are using to build with if you have something else configured) is returning a non-zero exit code? You should be able to get back speed by disabling almost all events in procmon and enabling the option to drop filtered out events.
@gregg-miskelly still same mate.