Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 10, 2025

This PR adds obsolete attributes to three MSTest APIs that will be removed in v4.0, providing early feedback to users in v3.10.

Changes Made

Added [Obsolete] attributes to:

  • CssIterationAttribute - CSS Iteration URI attribute
  • CssProjectStructureAttribute - CSS Project Structure URI attribute
  • DescriptionAttribute - Description of the test attribute

The obsolete attributes follow the existing pattern used by other deprecated types in the codebase:

#if NET6_0_OR_GREATER
[Obsolete(FrameworkConstants.PublicTypeObsoleteMessage, DiagnosticId = "MSTESTOBS")]
#else
[Obsolete(FrameworkConstants.PublicTypeObsoleteMessage)]
#endif

User Impact

When users compile code using these attributes in v3.10, they will see warnings:

Warning: 'CssIterationAttribute' is obsolete: 'We will remove or hide this type starting with v4. If you are using this type, reach out to our team on https://github.com/microsoft/testfx.'

This provides time for users to migrate away from these attributes before they are completely removed in v4.0 (as done in PR #5858).

Technical Details

  • No breaking changes - attributes remain functional in v3.10
  • Minimal implementation - only added 15 lines total (5 per file)
  • Follows existing patterns - uses standard PublicTypeObsoleteMessage constant
  • Conditional compilation - includes DiagnosticId for NET6_0_OR_GREATER

Fixes #5980.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…cription attributes

Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Obsolete CssIteration, CssProjectStructure, and Description Obsolete CssIteration, CssProjectStructure, and Description attributes for v3.10 Jul 10, 2025
@Copilot Copilot AI requested a review from Youssef1313 July 10, 2025 20:18
Copilot finished work on behalf of Youssef1313 July 10, 2025 20:18
@Youssef1313 Youssef1313 marked this pull request as ready for review July 11, 2025 06:07
Evangelink
Evangelink previously approved these changes Jul 11, 2025
@Evangelink Evangelink enabled auto-merge (squash) July 11, 2025 07:06
@Youssef1313 Youssef1313 changed the title Obsolete CssIteration, CssProjectStructure, and Description attributes for v3.10 Obsolete CssIteration and CssProjectStructure attributes for v3.10 Jul 14, 2025
@Evangelink Evangelink merged commit 3f0923c into main Jul 15, 2025
8 checks passed
@Evangelink Evangelink deleted the copilot/fix-5980 branch July 15, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Obsolete CssIteration, CssProjectStructure, and Description
3 participants