Skip to content

Microsoft Fakes does not generate Fakes namespace for System.IO.Abstractions interfaces #1073

Description

@RoyRosenberg

Try to generate MS Fakes Stubs for all interfaces under System.IO.Abstractions without success.

To Reproduce
Steps to reproduce the behavior:

  1. Create MS Test Project, add System.IO.Abstractions NuGet
  2. On System.IO.Abstractions.dll right-click and choose Add Fakes Assebmly.
  3. Build
  4. View FileSystemMockDemo.Fakes.dll under FakesAssemblies folder

Expected behavior
All Stub interfaces should be under System.IO.Abstractions.Fakes namepsace.

Additional context
I use VS 2022 Enterprise Edition
I also tried to remove the Shims generation

<Fakes xmlns="http://schemas.microsoft.com/fakes/2011/"  Diagnostic="true" Verbosity="Noisy">
  <Assembly Name="System.IO.Abstractions" Version="20.0.0.0"/>
  <ShimGeneration>
    <Clear />
  </ShimGeneration>
</Fakes>

or any other option like:

<Fakes xmlns="http://schemas.microsoft.com/fakes/2011/"  Diagnostic="true" Verbosity="Noisy">
  <Assembly Name="System.IO.Abstractions" Version="20.0.0.0"/>
  <StubGeneration>
    <Clear />
    <Add Interfaces="true"/>
  </StubGeneration>
  <ShimGeneration>
    <Clear />
  </ShimGeneration>
</Fakes>

Did anyone tried that, there is no documentation on that

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: metaIssues around high-level/organizational topicsstate: needs discussionIssues that need further discussiontype: questionIssues that ask for support / guidance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions