-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add GeneratedFilesOutputDirectory to Solution APIs #75389
Copy link
Copy link
Open
Labels
Area-IDEConcept-APIThis issue involves adding, removing, clarification, or modification of an API.This issue involves adding, removing, clarification, or modification of an API.api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedblockingAPI needs to reviewed with priority to unblock workAPI needs to reviewed with priority to unblock work
Milestone
Metadata
Metadata
Assignees
Labels
Area-IDEConcept-APIThis issue involves adding, removing, clarification, or modification of an API.This issue involves adding, removing, clarification, or modification of an API.api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedblockingAPI needs to reviewed with priority to unblock workAPI needs to reviewed with priority to unblock work
Type
Fields
Give feedbackNo fields configured for Feature.
Background and Motivation
Add APIs to the Project and Solution that expose the value of
CompilerGeneratedFilesOutputPathmsbuild property from the solution snapshot.See #75387
Proposed API
public readonly struct CompilationOutputInfo { public string? AssemblyPath { get; } + public string? GeneratedFilesOutputDirectory { get; } + public CompilationOutputInfo WithGeneratedFilesOutputDirectory(string? path); }Usage Examples
Alternative Designs
namespace Microsoft.CodeAnalysis; public class Project { + /// <summary> + /// The path to the root directory of source generated files, or null if it is not known. + /// </summary> + public string? GeneratedFilesOutputDirectory { get; } } public class ProjectInfo { + public string? GeneratedFilesOutputDirectory; + public ProjectInfo WithGeneratedFilesOutputDirectory(string? path); } public class Solution { + public Solution WithProjectGeneratedFilesOutputDirectory(ProjectId projectId, string? path); } public class Workspace { + protected internal void OnGeneratedFilesOutputDirectoryChanged(ProjectId projectId, string? outputFilePath); }Risks