Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RoyRosenberg opened this issue Dec 29, 2023 · 1 comment
Labels
area: meta Issues around high-level/organizational topics state: needs discussion Issues that need further discussion type: question Issues that ask for support / guidance

Comments

@RoyRosenberg
Copy link

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

@RoyRosenberg RoyRosenberg added state: needs discussion Issues that need further discussion type: bug Issues that describe misbehaving functionality labels Dec 29, 2023
@fgreinacher fgreinacher added type: question Issues that ask for support / guidance area: meta Issues around high-level/organizational topics and removed type: bug Issues that describe misbehaving functionality labels Jan 9, 2024
@fgreinacher
Copy link
Contributor

Thanks for raising this. I don't have any experience with Microsoft Fakes, but I'll leave this open to see if the community can help. Maybe also consider posting it on StackOverflow or the likes to reach a broader audience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: meta Issues around high-level/organizational topics state: needs discussion Issues that need further discussion type: question Issues that ask for support / guidance
Projects
None yet
Development

No branches or pull requests

2 participants