Skip to content

RequiredRuntimeAttribute is ignored and could be deleted #13046

@rainersigwald

Description

@rainersigwald

/// <summary>
/// When marked with the RequiredRuntimeAttribute, a task indicates that it has stricter
/// runtime requirements than a regular task - this tells MSBuild that it will need to potentially
/// launch a separate process for that task if the current runtime does not match the version requirement.
/// This attribute is currently non-functional since there is only one version of the CLR that is
/// capable of running MSBuild v2.0 or v3.5 - the runtime v2.0
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class RequiredRuntimeAttribute : Attribute

This is part of the public API surface, but is used in only one place in our repo

[RequiredRuntime("v2.0")]
public sealed partial class GenerateResource : TaskExtension, IIncrementalTask

And doesn't seem to be respected anywhere (e.g. nothing inspects for that attribute and behaves differently).

I think it's an older design for what eventually got implemented with UsingTask/magic task parameters for runtime, and could be removed.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions