Skip to content

Add ability to specify whether options of IOptionsProvider should be part of solution snapshot #42308

@tmat

Description

@tmat

Currently we decide based on the assembly the options provider is in:

// We only consider the options defined in the the DefaultAssemblies (Workspaces and Features) as serializable.
// This is due to the fact that other layers above are VS specific and do not execute in OOP.
if (!MefHostServices.IsDefaultAssembly(provider.GetType().Assembly))

http://sourceroslyn.io/#Microsoft.CodeAnalysis.Workspaces/Options/GlobalOptionService.cs,66

It would be better to explicitly declare where the option should be available via an argument to ExportOptionProvider. E.g. ClientOnly = true would mean the option is not serialized to the solution snapshot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions