Skip to content

Empty #:project appears to add a project item for the app directory #49670

@RikkiGibson

Description

@RikkiGibson

Repro:

#:project 

using System.Linq;

class Class1
{
    BAD BAD;
}

run-api reported the following:

2025-07-07 12:17:01.858 [info] [Error - 12:17:01 PM] [textDocument/_vs_getProjectContexts] [Microsoft.CodeAnalysis.LanguageServer.FileBasedPrograms.FileBasedProgramsProjectSystem] c:\Users\rikki\src\fbp-scratch\misc.cs0,0: The '#:project' directive at 'c:\Users\rikki\src\fbp-scratch\misc.cs:1' is invalid: Could not find any project in `c:\Users\rikki\src\fbp-scratch`.

I expected that having no path at all would report a 'syntax error' in run-api, and no project item would be added for it.
@jjonescz

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions