Skip to content

C++ Warnings introduced with 4.0.0 #7236

@skrulj

Description

@skrulj

Describe the bug

Importing MSTest.TestFramework starting from version 4.0.0, and including current released version 4.0.2 in a C++ project results in a warning. Further this warning causes Intellisense to stop code completion regarding functions in the related assembly and reports false positives regarding them.

Steps To Reproduce

  1. Create a .net10 (NetCore) C++ project, Import the following packages:

  2. Create a test class and a test method

  3. Compile

See reproduction project:

UnitTest_dotnet10_Test.zip

Expected behavior

No warnings

Actual behavior

Warning C4679 is thrown:

'Microsoft::VisualStudio::TestTools::UnitTesting::TestMethodAttribute::set': could not import item or its associated custom attribute

Workaround

To fix the warnings during compilation we surpressed C4679:
4679

However, that did not fix Intellisense reports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions