| File: Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TypedProperties.g.cs | |
| Project: Microsoft.NET.ProjectData.csproj (Microsoft.NET.ProjectData) |
// <auto-generated/> #nullable enable // Generated from project-data-schema.json by DataModelSchemaGenerator. using System; namespace Microsoft.NET.ProjectData; /// <summary>Strongly-typed accessor over <see cref="KeyValueCollection"/>.</summary> internal readonly ref struct TypedProperties { private readonly KeyValueCollection inner; public TypedProperties(KeyValueCollection inner) => this.inner = inner; /// <summary>Assembly output name.</summary> public string AssemblyName => this.inner[ProjectProperties.AssemblyName] ?? throw new InvalidOperationException("Required Data Model property '" + ProjectProperties.AssemblyName + "' is missing. The .lscache file may be incomplete or the property merge failed."); /// <summary>Project output type: Library, Exe, WinExe.</summary> public string OutputType => this.inner[ProjectProperties.OutputType] ?? throw new InvalidOperationException("Required Data Model property '" + ProjectProperties.OutputType + "' is missing. The .lscache file may be incomplete or the property merge failed."); /// <summary>Active target framework moniker (e.g., net10.0).</summary> public string TargetFramework => this.inner[ProjectProperties.TargetFramework] ?? throw new InvalidOperationException("Required Data Model property '" + ProjectProperties.TargetFramework + "' is missing. The .lscache file may be incomplete or the property merge failed."); /// <summary>Framework identifier (e.g., .NETCoreApp).</summary> public string TargetFrameworkIdentifier => this.inner[ProjectProperties.TargetFrameworkIdentifier] ?? throw new InvalidOperationException("Required Data Model property '" + ProjectProperties.TargetFrameworkIdentifier + "' is missing. The .lscache file may be incomplete or the property merge failed."); /// <summary>Path to project.assets.json.</summary> public string ProjectAssetsFile => this.inner[ProjectProperties.ProjectAssetsFile] ?? throw new InvalidOperationException("Required Data Model property '" + ProjectProperties.ProjectAssetsFile + "' is missing. The .lscache file may be incomplete or the property merge failed."); /// <summary>Full path to the primary build output assembly.</summary> public string TargetPath => this.inner[ProjectProperties.TargetPath] ?? throw new InvalidOperationException("Required Data Model property '" + ProjectProperties.TargetPath + "' is missing. The .lscache file may be incomplete or the property merge failed."); /// <summary>Root namespace for the project.</summary> public string? RootNamespace => this.inner[ProjectProperties.RootNamespace]; /// <summary>Whether the project should be included in test discovery. An explicit false value opts a project out even when it has the TestContainer capability.</summary> public string? IsTestProject => this.inner[ProjectProperties.IsTestProject]; /// <summary>Framework version (e.g., v10.0).</summary> public string? TargetFrameworkVersion => this.inner[ProjectProperties.TargetFrameworkVersion]; /// <summary>Path to the ref assembly (if produced).</summary> public string? TargetRefPath => this.inner[ProjectProperties.TargetRefPath]; /// <summary>Maximum C# language version supported by the SDK.</summary> public string? MaxSupportedLangVersion => this.inner[ProjectProperties.MaxSupportedLangVersion]; /// <summary>Whether analyzers run during build.</summary> public string? RunAnalyzers => this.inner[ProjectProperties.RunAnalyzers]; /// <summary>Whether analyzers run during live analysis.</summary> public string? RunAnalyzersDuringLiveAnalysis => this.inner[ProjectProperties.RunAnalyzersDuringLiveAnalysis]; /// <summary>Directory for source-generated files.</summary> public string? CompilerGeneratedFilesOutputPath => this.inner[ProjectProperties.CompilerGeneratedFilesOutputPath]; /// <summary>Root intermediate-output directory (default obj/). Persisted so the redirected location is known when releasing VS Code's recursive watcher handles before a folder rename on Windows.</summary> public string? BaseIntermediateOutputPath => this.inner[ProjectProperties.BaseIntermediateOutputPath]; /// <summary>Root build-output directory (default bin/). Persisted so the redirected location is known when releasing VS Code's recursive watcher handles before a folder rename on Windows.</summary> public string? BaseOutputPath => this.inner[ProjectProperties.BaseOutputPath]; /// <summary>Path to the solution file (injected at runtime, not from cache).</summary> public string? SolutionPath => this.inner[ProjectProperties.SolutionPath]; /// <summary>Roslyn/CPS dependency-node TFM identifier. Duplicates TargetFramework's value but Roslyn keys on this exact (intentionally awkward) name to identify a dependency node's target framework, so it must be persisted under this name for cache-load workspace hydration. Not otherwise read as a typed property.</summary> public string? TemporaryDependencyNodeTargetIdentifier => this.inner[ProjectProperties.TemporaryDependencyNodeTargetIdentifier]; } internal static class TypedPropertiesExtensions { public static TypedProperties Typed(this ProjectDataSnapshot snapshot) => new(snapshot.Properties); }