Deprecate EnableShutdownAfterTestRun which is no-op by Youssef1313 · Pull Request #15576 · microsoft/vstest (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This property forwards to _frameworkHandle.EnableShutdownAfterTestRun, which is now [Obsolete(..., error: true)] on the interface. Accessing an obsolete member with error: true typically fails compilation even inside another obsolete member, so this forwarding implementation is likely to break the build. Since the property is declared “no effect”, implement it as a local no-op (e.g., constant false + empty setter) to avoid referencing the obsolete member.
| public bool EnableShutdownAfterTestRun { get => _frameworkHandle.EnableShutdownAfterTestRun; set => _frameworkHandle.EnableShutdownAfterTestRun = value; } |
|---|
| public bool EnableShutdownAfterTestRun { get => false; set { } } |