31 references to WithProjectCompilationOptions
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
53solution = solution.WithProjectCompilationOptions(projectId, modifiedCompilationOptions);
IdeCoreBenchmarks (1)
SwitchStatementBenchmarks.cs (1)
72solution = solution.WithProjectCompilationOptions(projectId, new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
Microsoft.AspNetCore.Analyzer.Testing (1)
DiagnosticVerifier.cs (1)
163.WithProjectCompilationOptions(projectId, new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UpdateProjectToAllowUnsafe\CSharpUpdateProjectToAllowUnsafeCodeFixProvider.cs (1)
43return project.Solution.WithProjectCompilationOptions(project.Id, compilationOptions.WithAllowUnsafe(true));
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (3)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryImports\RemoveUnnecessaryImportsTests.cs (1)
2065return solution.WithProjectCompilationOptions(projectId, compilationOptions.WithWarningLevel(warningLevel));
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveTests.cs (1)
488return solution.WithProjectCompilationOptions(projectId, compilationOptions.WithNullableContextOptions(compilationNullableContextOptions));
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveTests.cs (1)
243return solution.WithProjectCompilationOptions(projectId, compilationOptions.WithNullableContextOptions(compilationNullableContextOptions));
Microsoft.CodeAnalysis.CSharp.Features (2)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
90solution = solution.WithProjectCompilationOptions(project.Id, compilationOptions.WithNullableContextOptions(NullableContextOptions.Enable));
src\Analyzers\CSharp\CodeFixes\UpdateProjectToAllowUnsafe\CSharpUpdateProjectToAllowUnsafeCodeFixProvider.cs (1)
43return project.Solution.WithProjectCompilationOptions(project.Id, compilationOptions.WithAllowUnsafe(true));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (9)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1065workspace.SetCurrentSolution(s => s.WithProjectCompilationOptions(projectId, compilationOptions), WorkspaceChangeKind.ProjectChanged, projectId);
Diagnostics\Suppression\SuppressionTests.cs (2)
762var updatedSolution = solution.WithProjectCompilationOptions(solution.ProjectIds.Single(), compilationOptions); 1004var updatedSolution = solution.WithProjectCompilationOptions(solution.ProjectIds.Single(), compilationOptions);
EnableNullable\EnableNullableTests.cs (3)
37solution = solution.WithProjectCompilationOptions(projectId, compilationOptions.WithNullableContextOptions(NullableContextOptions.Enable)); 53solution = solution.WithProjectCompilationOptions(projectId, compilationOptions.WithNullableContextOptions(NullableContextOptions.Enable)); 553return solution.WithProjectCompilationOptions(projectId, compilationOptions.WithNullableContextOptions(nullableContextOptions));
src\Analyzers\CSharp\Tests\RemoveUnnecessaryImports\RemoveUnnecessaryImportsTests.cs (1)
2065return solution.WithProjectCompilationOptions(projectId, compilationOptions.WithWarningLevel(warningLevel));
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveTests.cs (1)
488return solution.WithProjectCompilationOptions(projectId, compilationOptions.WithNullableContextOptions(compilationNullableContextOptions));
src\Analyzers\CSharp\Tests\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveTests.cs (1)
243return solution.WithProjectCompilationOptions(projectId, compilationOptions.WithNullableContextOptions(compilationNullableContextOptions));
Microsoft.CodeAnalysis.Workspaces (3)
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
362set => ChangeProjectProperty(ref _compilationOptions, value, s => s.WithProjectCompilationOptions(Id, value), logThrowAwayTelemetry: true);
Workspace\Solution\Project.cs (1)
600=> this.Solution.WithProjectCompilationOptions(this.Id, options).GetRequiredProject(Id);
Workspace\Workspace.cs (1)
864=> SetCurrentSolution(oldSolution => oldSolution.WithProjectCompilationOptions(projectId, options), WorkspaceChangeKind.ProjectChanged, projectId);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
411var solution2 = solution1.WithProjectCompilationOptions(project.Id, project.CompilationOptions.WithOutputKind(OutputKind.NetModule));
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
SolutionTests\SolutionTests.cs (5)
1726Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectCompilationOptions(null!, options)); 1727Assert.Throws<ArgumentNullException>("options", () => solution.WithProjectCompilationOptions(projectId, options: null!)); 1728Assert.Throws<InvalidOperationException>(() => solution.WithProjectCompilationOptions(ProjectId.CreateNewId(), options)); 1748solution = solution.WithProjectCompilationOptions(projectId, defaultOptions); 4831.WithProjectCompilationOptions(projectId, new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithNullableContextOptions(NullableContextOptions.Enable));
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
229return solution.WithProjectCompilationOptions(project.Id, ((CSharpCompilationOptions)project.CompilationOptions).WithAllowUnsafe(true));
Microsoft.Interop.LibraryImportGenerator (1)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
229return solution.WithProjectCompilationOptions(project.Id, ((CSharpCompilationOptions)project.CompilationOptions).WithAllowUnsafe(true));
Microsoft.ML.CodeAnalyzer.Tests (1)
Code\RelaxTestNamingTest.cs (1)
25return solution.WithProjectCompilationOptions(projectId, compilationOptions.WithReportSuppressedDiagnostics(false));
System.Windows.Forms.Analyzers.CSharp.Tests (1)
Analyzers\Verifiers\CSharpIncrementalSourceGeneratorVerifier.cs (1)
25solution = solution.WithProjectCompilationOptions(projectId, compilationOptions);