-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
gathering-feedbackThe issue requires feedback in order to be planned, please comment if the feature is useful for youThe issue requires feedback in order to be planned, please comment if the feature is useful for youtriaged
Milestone
Description
Version Used: .NET 9.0.100
Steps to Reproduce:
- Create a new console application (
dotnet new console) - Edit Program.cs to:
#line 100 ":invalid:"
int x = 5.0;- Run
dotnet build
Expected Behavior:
Normal error messages without a crash.
Actual Behavior:
C:\Program Files\dotnet\sdk\9.0.100\Roslyn\Microsoft.CSharp.Core.targets(89,5): error MSB6006: "csc.dll" exited with code 1.
Notes:
- Visual Studio indicates csc.dll exiting with code 1 as well
- This is not reproducible in SharpLab - I suspect it's injecting its own
#linedirectives - Changing
":invalid:"to"valid"produces normal error messages. - Names of
".",".."and"..."produce some interesting results - Changing the code to only produce a warning (e.g. just
int x = 5;which results in CS0219) when using":invalid:"is weird - the build succeeds without issuing a warning at all
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
gathering-feedbackThe issue requires feedback in order to be planned, please comment if the feature is useful for youThe issue requires feedback in order to be planned, please comment if the feature is useful for youtriaged