question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'dotnet build' produces no useful error messages

See original GitHub issue

Steps 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:closed
  • Created 6 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
svickcommented, Aug 30, 2017

What is the output of dotnet build /v:n?

0reactions
livarcocccommented, Sep 25, 2017

This issue was moved to dotnet/roslyn#22332

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found