'dotnet build' produces no useful error messages
See original GitHub issueSteps to reproduce
create a new project with dotnet new console
break project by making Program.cs unbuildable
execute dotnet build
Expected behavior
Useful error message referencing source file names and line numbers.
Actual behavior
error message is basically “it didn’t work”
C:\_prj\a1>dotnet build
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files\dotnet\sdk\2.0.0\Roslyn\Microsoft.CSharp.Core.targets(84,5): error MSB6006: "C:\Program Files\dotnet\sdk\2.0.0\Roslyn\RunCsc.cmd" exited with code 1. [C:\_prj\a1\a1.csproj]
Build FAILED.
C:\Program Files\dotnet\sdk\2.0.0\Roslyn\Microsoft.CSharp.Core.targets(84,5): error MSB6006: "C:\Program Files\dotnet\sdk\2.0.0\Roslyn\RunCsc.cmd" exited with code 1. [C:\_prj\a1\a1.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.46
Environment data
dotnet --info
output:
.NET Command Line Tools (2.0.0)
Product Information: Version: 2.0.0 Commit SHA-1 hash: cdcd1928c9
Runtime Environment: OS Name: Windows OS Version: 10.0.15063 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.0.0\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0 Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
'dotnet build' produces no useful error messages #8674
Steps to reproduce create a new project with dotnet new console break project by making Program.cs unbuildable execute dotnet build Expected ...
Read more >Net 5 Scaffoling "Build failed. Use dotnet build to see the ...
1 Answer. Make sure any assembly projects included in your main project build successfully. Clean your project and make sure it is also...
Read more >dotnet build command - .NET CLI
The dotnet build command builds the project and its dependencies into a set of binaries. The binaries include the project's code in ...
Read more >C# Compiler Options to report errors and warnings
C# Compiler Options for errors and warnings. These options suppress or enable warnings, and control warnings as errors.
Read more >Improving .NET host error messages and supportability
NET app and seen an error message telling you that you are missing a runtime, ... NET application: The application 'build' does not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What is the output of
dotnet build /v:n
?This issue was moved to dotnet/roslyn#22332