VS 2022 Shims, Stubs, Fakes fail to build

Robert Hull 6 Reputation points
2022-10-17T19:31:05.803+00:00

Just upgraded from VS 2012 Pro to VS 2022 Enterprise. Previously functioning Shims, Stubs and Accessors all fail to be created. ("not declared/defined")

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
346 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,033 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 53,726 Reputation points
    2022-10-17T21:19:50.297+00:00

    Did you go through the steps mentioned here? The Fakes framework and entire unit test subsystem was rewritten between 2012 and 2022. You need to make adjustments to your unit test projects (including upgrading them) as discussed in the docs before anything will work.

    Once you've done that, and if it still doesn't work, then please provide us the details of your project including the target framework, SDK or legacy project, test framework and version being used, and screenshots and/or example code to replicate the issue.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.