-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'dotnet build' produces no useful error messages #22332
Comments
From @omajid on August 30, 2017 13:20
Can you elaborate on this? How exactly did you break it? It looks like some specific cases lead to that in error. In other cases, I see fairly useful error messages. For example, if I remove one opening brace
|
From @shinmai on August 30, 2017 15:9 No matter what kind of error I introduce, the only output I get is |
From @svick on August 30, 2017 15:36 What is the output of |
From @nguerrera on August 31, 2017 5:46 @shinmai Can you also post the contents of Program.cs and a2.csproj? |
From @shinmai on August 31, 2017 8:33
Not much more helpful, but longer.
Oh, sure. Program.cs:
a2.csproj (a1 is identical, I was just testing with two projects side by side):
Both are untouched from what I should note, error-free code builds and runs fine, but if there are build errors, I'm completely on my own in tracking them down, which is obviously something of a hassle in even rather trivial programs. |
From @dasMulli on August 31, 2017 9:26 Those errors won't log on It does not repro on my machine though:
|
From @nguerrera on August 31, 2017 12:57 Please share the output of |
From @anavarro9731 on September 16, 2017 20:46 I have the same issue. Works on my dev machine but fails on VSTS Build. |
From @nguerrera on September 18, 2017 19:52 Error code -2146232797 is 0x80131623 == COR_E_FAILFAST. @anavarro9731 Are you able to bump the verbosity, e.g. |
From @anavarro9731 on September 23, 2017 15:6 @nguerrera I have tracked down the problem, it is related to the scoping of variables in one class. In particular how variables declared at method-level scope are accessed by local functions within that method. Changing the structure of the code to pass the method-level variable to the local functions via an argument rather than having them access the outer scope directly solves the problem. I can send you the build output and both version of the file in question if you provide me a way to send them to you. It also appears this is only a problem on the very latest version of the compiler. We have confirmed on several machines that installing the latest visual studio update causes the problem to manifest. |
@jaredpar it feels like we should move this issue to roslyn. |
From @anavarro9731 on September 23, 2017 18:3 before we found the offending code we used the fix here: |
From @svick on September 23, 2017 19:38 @anavarro9731 That description makes it sound like #19033. But if you have a repro, it might still make sense to open an issue on Roslyn, to make sure it's indeed the same issue. |
Moving this to Roslyn for now to see if it is indeed a duplicate. If this is something that needs to be addressed in the CLI, please re-activate. |
@anavarro9731 From the thread above and your description ("how variables declared at method-level scope are accessed by local functions within that method"), I think this is a known issue which is fixed in 15.5. The first preview of 15.5 will be available in October. If you have source code to repro, we will confirm this was indeed fixed. FYI @agocke
|
I'll go ahead and close (as far as I can tell, this compiler crash was fixed). |
From @shinmai on August 30, 2017 10:19
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"
Environment data
dotnet --info
output:Copied from original issue: dotnet/cli#7556
The text was updated successfully, but these errors were encountered: