Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Optional
  • Loading branch information
tmat committed Dec 5, 2025
commit b3955bb3f30b589c3b60df3db71fafcbefc4ea2c
6 changes: 3 additions & 3 deletions src/Cli/dotnet/Commands/Run/VirtualProjectBuildingCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1018,11 +1018,11 @@ public ProjectInstance CreateProjectInstance(ProjectCollection projectCollection
{
Builder.CreateProjectInstance(
projectCollection,
Directives,
addGlobalProperties,
ThrowingReporter,
out var project,
out var evaluatedDirectives);
out var evaluatedDirectives,
Directives,
addGlobalProperties);

Directives = evaluatedDirectives;

Expand Down
11 changes: 8 additions & 3 deletions src/Microsoft.DotNet.ProjectTools/VirtualProjectBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,17 @@ public static ImmutableArray<CSharpDirective> EvaluateDirectives(

public void CreateProjectInstance(
ProjectCollection projectCollection,
ImmutableArray<CSharpDirective> directives,
Action<IDictionary<string, string>>? addGlobalProperties,
ErrorReporter errorReporter,
out ProjectInstance project,
out ImmutableArray<CSharpDirective> evaluatedDirectives)
out ImmutableArray<CSharpDirective> evaluatedDirectives,
ImmutableArray<CSharpDirective> directives = default,
Action<IDictionary<string, string>>? addGlobalProperties = null)
{
if (directives.IsDefault)
{
directives = FileLevelDirectiveHelpers.FindDirectives(EntryPointSourceFile, reportAllErrors: false, errorReporter);
}

project = CreateProjectInstance(projectCollection, directives, addGlobalProperties);

evaluatedDirectives = EvaluateDirectives(project, directives, EntryPointSourceFile, errorReporter);
Expand Down
Loading